This project was first started by Richard Tuin and now I have taken on the task of intergating this excellant software into FCKeditor
GeSHi Pro is for the FCKeditor and is an implementation of the famous php Geshi library for FCKeditor. This FCKeditor plugin helps you to put scripting code colored in FCKeditor. It automatically syntax highlight's code, color's the code you enter, and adds the generated code to FCKeditor.
This FCKeditor plugin uses the GeSHi library. GeSHi stands for Generic Syntax Highlighter and supports a wide variety of programming languages. Including: C#, PHP, ASP, VB, javascript, actionscript, C++, delphi and many more (GeSHi can highlight 80+ languages by default).
Since GeSHi is a PHP script, this FCKeditor plugin only works if your webserver is PHP-enabled.
GeSHi Pro for FCKeditor is easy to install and even more easy to use.
Give it a try!
version 1.2:
- Updated the geshi javascript to be compatable with FCKeditor 1.6
- choice of line numbers (none, normal or fancy)
- add tab width
- enable CSS classes
- choice of code container (none, <pre> or <div>)
- FCKeditor
- PHP enabled website
A demo of GeSHi Pro can be found here
You can install the plugin by extracting the 'geshipro' folder from the gzip file, and copy it to your FCKeditor plugin directory (which is 'editor/plugins/' usually).
To enable the plugin you have to add the following lines at the lines mentioned in fckconfig.js (in the FCKeditor root directory):
- ADD: FCKConfig.Plugins.Add( 'geshipro', 'en' ) ;
- BEFORE: FCKConfig.AutoGrowMax = 400 ;
To have the plugin's button on the toolbar in FCKeditor (which is mandatory to get it to work) you have to add it to the toolbar. To add the button to the Default Toolbar in FCKeditor you must find the array 'FCKConfig.ToolbarSets["Default"]' in the fckconfig.js file.
Within this array find the line '['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],' and replace it with '['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat','-','GeSHiPro'],'.
Now the plugin should be working! Have fun with it!
Feel free to email me if you have problems with this plugin, also email me to let me know what to inprove or if you just like it!