I got it to work, but it is not easy as the available plugin is very poorly documented.
see a very simple example here:
http://www.urbanistan.de/getsimple/syntax-1
download the plugin from
http://code.google.com/p/ckeditor-syntaxhighlight/ and follow the installation
this plugin is only half the work:
- you need to load the original Syntaxhighlighter Script from
http://alexgorbatchev.com/SyntaxHighligh...iguration/
I uploaded it to
admin/templates/js/syntaxhighligter
- the best would be to create a special template for pages with code and add this to the header.
Code:
<!-- SyntaxHighlighter -->
<link type="text/css" rel="stylesheet" href="admin/template/js/syntaxhighlighter/styles/shCoreDefault.css"/>
<link type="text/css" rel="stylesheet" href="admin/template/js/syntaxhighlighter/styles/shCore.css"/>
<script type="text/javascript" src="admin/template/js/syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="admin/template/js/syntaxhighlighter/scripts/shBrushCss.js"></script>
<script type="text/javascript" src="admin/template/js/syntaxhighlighter/scripts/shBrushJScript.js"></script>
<script type="text/javascript" src="admin/template/js/syntaxhighlighter/scripts/shBrushPhp.js"></script>
<script type="text/javascript" src="admin/template/js/syntaxhighlighter/scripts/shBrushPlain.js"></script>
- after the content in the template, you must add:
Code:
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
in your template
to configure the editor, you have to add a button to the toolbar:
in the gsconfig.php add this to the DEFINE EDITORTOOL- Definition
in the GSEDITOROPTIONS:
Code:
define('GSEDITOROPTIONS', "
extraPlugins : 'syntaxhighlight',
syntaxhighlighthLangDefault : 'php'
");
in the
syntaxhightlightLangDefault set the Language you want, either PHP or JAVA or whatever
thats not all, in
admin/templates/js/ckeditor/config.js add this:
Code:
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.toolbarCanCollapse = true; // hide toolbar collapse button
config.extraPlugins += (config.extraPlugins ? ',syntaxhighlight' : 'syntaxhighlight' );
config.toolbar_Full.push(['Code']);
};
then it should work and you can send me roses ;=)