cotonti.com : SyntaxHighlighter - Custom Brushes https://www.cotonti.com Последние сообщения в теме Cotonti en Mon, 22 Dec 2025 09:53:51 -0000 Macik As I remember… not. You can not just add addition styles this way.

To add it you must do these steps:

Replace:

$sh_core_js = $cfg['plugins_dir'] . '/syntaxhighlighter/lib/scripts/shAll.min.js';

cot_rc_embed_footer(<<<JS
$(function(){if($('pre').length>0){ $('head').append('$sh_core_css');$('head').append('$sh_theme_css');var sh_e1=document.createElement('script');sh_e1.async=true;sh_e1.src ='$sh_core_js';document.getElementById('body').appendChild(sh_e1);}});
JS
);

With something like this (I'm not check the actual code): 

	$sh_core_js = $cfg['plugins_dir'] . '/syntaxhighlighter/lib/scripts/shCore.js';
	$sh_autoloader_js = $cfg['plugins_dir'] . '/syntaxhighlighter/lib/scripts/shAutoloader.js';

cot_rc_embed_footer(<<<JS
$(function(){if($('pre').length>0){ $('head').append('$sh_core_css');$('head').append('$sh_theme_css');var sh_e1=document.createElement('script');sh_e1.async=true;sh_e1.src ='$sh_core_js';$('body').append(sh_e1);
var sh_e2=document.createElement('script');sh_e2.async=true;sh_e2.src ='$sh_autoloader_js';$('body').append(sh_e2);
}});
JS
);

We load 2 files (shCore.js, shAutoloader.js) instead of `shAll.min.js`

Any way, look at doc for autoloader — http://alexgorbatchev.com/SyntaxHighlighter/manual/api/autoloader.html

 

]]>
пт, 02 мая 2014 16:19:53 -0000
Hodges Hi Trustmaster,

I was looking at this page http://www.undermyhat.org/blog/2009/09/list-of-brushes-syntaxhighligher/ that offers custom brushes for syntaxhighligter outside the standard set. How would I include these extra brushes into your plugin? At the moment the default brushes are all merged together in syntaxhighlighter/lib/scripts/shAll.min.js.

For example if I wanted to add shBrushLatex.js could this be appended into line 25 of syntaxhighlighter/syntaxhighlighter.footer.php, for example?

Thanks,
Hodges

]]>
пт, 02 мая 2014 13:49:00 -0000