Hi, with the attached patch it is possible to set up a site-wide configuration for syntaxhighlighter.

Yes, you still need to edit the code, I just hacked it for testing various syntaxhighlighter options, not for actual deployment. But it could still be useful to someone.

BTW, it also triggered an issue in syntaxhighlighter itself, it looks like it doesn't honour font-size default setting, but this is OT here.

Regards,
Antonio

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mattyoung’s picture

Status: Closed (fixed) » Fixed

I added a "Default expressions" textarea in settings so user can enter any syntax highlighter default setup there and that is included in the syntax highlighter initialization. So you can add all your defaults there like this:

SyntaxHighlighter.defaults['auto-links'] = true;
SyntaxHighlighter.defaults['class-name'] = '';
SyntaxHighlighter.defaults['collapse'] = false;
SyntaxHighlighter.defaults['font-size'] = '100%';

>it looks like it doesn't honour font-size default setting,

report this to http://alexgorbatchev.com/forums/

ao2’s picture

Version: 6.x-1.12 » 6.x-1.13
Assigned: Unassigned » mattyoung
Status: Needs work » Fixed

Ok, already better than my dirty hack :)
Maybe the example text could be more complete, but that's not very important.

About the font-size issue, it seems they are already aware of that:
http://alexgorbatchev.com/forums/comments.php?DiscussionID=67&page=1#Item_0

Thanks,
Antonio

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.