GeSHi Pro
| Menu |
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!
What's New
version 1.2:
- Updated the geshi javascript to be compatable with FCKeditor 1.6
Features
- choice of line numbers (none, normal or fancy)
- add tab width
- enable CSS classes
- choice of code container (none, <pre> or <div>)
Requirements
- FCKeditor
- PHP enabled website
Download
The lastest version is GeSHi Pro 1.2 and can be download from here
Demo
A demo of GeSHi Pro can be found here
How to Install
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!
Installing into JoomlaFCK 2.6.4
Installing into joomla is a bit more tricky as JoomlaFCK uses another config file to enable the toolbar buttons.
First you need to find the file in your joomla root directory '/plugins/editors/fckeditor/fckconfig.js' and follow the above instructions (I don't really know if this is relavant but it's working for me).
Now find the xml file '/plugins/editors/fckeditor/editor/jtoolbarsetconfig.xml'.
In this file is stored the all the toolbar configurations for FCKEditor.
There are three toolbars that we will be concerned with nested within '<config><toolbarsets>', which are 'Advanced, Creative and Blog'. We have to insert our new button in one of plugingroups in each of the toolbars:
Like:
<plugin name="Link" acl="*">
<params>
<param name="KeyStrokes" >
<item type="String">CTRL</item>
<item type="Integer">76</item>
</param>
</params>
</plugin>
<plugin name="Unlink" acl="*"/>
<plugin name="Spacer" />
<plugin name="About" acl="*"/>
<plugin name="GeSHiPro" acl="*"/>
</plugingroup>
you have to do this foreach toolbar.
I put mine at the end of each toolbar after the 'About' button as you can see in the config file below at lines 228, 449 and 563.
Now at the end of the file is a group called '<customplugins>' add:
Prevent Joomla 1.5 from modifying highlighted code containing HTML.
a) In the Joomla administration menu, click the "Content" button in the
top menu and select 'Article Manager'
b) Click the 'Parameters' button in the top right of the Article
Manager.
c) Scroll down to the bottom of the parameters window and select
'Registered' in the 'Filter Groups' section and check the
'Blacklist (Default)' option for the 'Filter Type'
d) Scroll to the top of the parameters window and press the save button.
And that should be all there is to it. Don't forget to clear your browsers cache before checking if it's done as I had problems of a cached version not showing what I had done!
Your config file should now look something like (but not indented as I indended mine for easier reading):
- <?xml version="1.0" encoding="utf-8" ?>
- <config>
- <toolbarsets>
- <toolbar name="Advanced">
- <plugingroups>
- <plugingroup>
- <plugin name="Source" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">69</item>
- </param>
- </params>
- </plugin>
- <plugin name="FormatSource" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">68</item>
- </param>
- </params>
- </plugin>
- <plugin name="ShowBlocks" acl="*"/>
- <plugin name="Templates" acl="*"/>
- <plugin name="Preview" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Cut" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">88</item>
- </param>
- <param name="KeyStrokes" >
- <item type="String">SHIFT</item>
- <item type="Integer">46</item>
- </param>
- </params>
- </plugin>
- <plugin name="Copy" acl="*"/>
- <plugin name="Paste" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">86</item>
- </param>
- <param name="KeyStrokes" >
- <item type="String">SHIFT</item>
- <item type="Integer">45</item>
- </param>
- </params>
- </plugin>
- <plugin name="PasteText" acl="*"/>
- <plugin name="PasteWord" acl="*"/>
- <plugin name="Spacer"/>
- <plugin name="Print" acl="*"/>
- <plugin name="SpellCheck" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Undo" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">90</item>
- </param>
- </params>
- </plugin>
- <plugin name="Redo" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String" >CTRL</item>
- <item type="integer" >89</item>
- </param>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="String">SHIFT</item>
- <item type="Integer">90</item>
- </param>
- </params>
- </plugin>
- <plugin name="Spacer"/>
- <plugin name="Find" acl="*"/>
- <plugin name="Replace" acl="*"/>
- <plugin name="Spacer"/>
- <plugin name="SelectAll" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Bold" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">66</item>
- </param>
- </params>
- </plugin>
- <plugin name="Italic" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">73</item>
- </param>
- </params>
- </plugin>
- <plugin name="Underline" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">85</item>
- </param>
- </params>
- </plugin>
- <plugin name="StrikeThrough" acl="*"/>
- <plugin name="Spacer"/>
- <plugin name="Subscript" acl="*"/>
- <plugin name="Superscript" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="OrderedList" acl="*"/>
- <plugin name="UnorderedList" acl="*"/>
- <plugin name="Spacer"/>
- <plugin name="Outdent" acl="*"/>
- <plugin name="Indent" acl="*"/>
- <plugin name="Blockquote" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="JustifyLeft" acl="*"/>
- <plugin name="JustifyCenter" acl="*"/>
- <plugin name="JustifyRight" acl="*"/>
- <plugin name="JustifyFull" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="istyles" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="String">SHIFT</item>
- <item type="Integer">73</item>
- </param>
- </params>
- </plugin>
- <plugin name="CreateDiv" acl="*"/>
- <plugin name="TextColor" acl="*"/>
- <plugin name="BGColor" acl="*"/>
- <plugin name="RemoveFormat" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Link" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">76</item>
- </param>
- </params>
- </plugin>
- <plugin name="JLink" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="String">SHIFT</item>
- <item type="Integer">76</item>
- </param>
- </params>
- </plugin>
- <plugin name="Unlink" acl="*"/>
- <plugin name="Anchor" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="ImageManager" acl="*" />
- <plugin name="Image" acl="*"/>
- <plugin name="Flash" acl="*"/>
- <plugin name="Spacer" />
- <plugin name="Table" acl="*"/>
- <plugin name="Rule" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Stylesheet" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Style" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="FontFormat" acl="*">
- <params>
- <param name="FontFormats" value="p;div;pre;address;h1;h2;h3;h4;h5;h6" />
- </params>
- </plugin>
- </plugingroup>
- <plugingroup>
- <plugin name="FontName" acl="*">
- <params>
- <param name="FontNames" value="Arial ;Courier New ;Tahoma ;Times New Roman ;Verdana" />
- </params>
- </plugin>
- </plugingroup>
- <plugingroup>
- <plugin name="FontSize" acl="*">
- <params>
- <param name="FontSizes" value="8;9;10;11;12;14;16;18;20;22;24;26;28;36;48;smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large" />
- </params>
- </plugin>
- </plugingroup>
- <plugingroup>
- <plugin name="Form" acl="*"/>
- <plugin name="Checkbox" acl="*"/>
- <plugin name="Radio" acl="*"/>
- <plugin name="TextField" acl="*"/>
- <plugin name="Textarea" acl="*"/>
- <plugin name="Select" acl="*"/>
- <plugin name="Button" acl="*"/>
- <plugin name="ImageButton" acl="*"/>
- <plugin name="HiddenField" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Smiley" acl="*"/>
- <plugin name="SpecialChar" acl="*"/>
- <plugin name="Spacer"/>
- <plugin name="FitWindow" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="String">ALT</item>
- <item type="Integer">13</item>
- </param>
- </params>
- </plugin>
- <plugin name="Spacer"/>
- <plugin name="About" acl="*"/>
- <plugin name="GeSHiPro" acl="*"/>
- </plugingroup>
- </plugingroups>
- </toolbar>
- <toolbar name="Creative">
- <plugingroups>
- <plugingroup>
- <plugin name="Source" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">69</item>
- </param>
- </params>
- </plugin>
- <plugin name="FormatSource" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">68</item>
- </param>
- </params>
- </plugin>
- <plugin name="Spacer"/>
- <plugin name="Preview" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Cut" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">88</item>
- </param>
- <param name="KeyStrokes" >
- <item type="String">SHIFT</item>
- <item type="Integer">46</item>
- </param>
- </params>
- </plugin>
- <plugin name="Copy" acl="*"/>
- <plugin name="Paste" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">86</item>
- </param>
- <param name="KeyStrokes" >
- <item type="String">SHIFT</item>
- <item type="Integer">45</item>
- </param>
- </params>
- </plugin>
- <plugin name="PasteText" acl="*"/>
- <plugin name="PasteWord" acl="*"/>
- <plugin name="Spacer"/>
- <plugin name="Print" acl="*"/>
- <plugin name="SpellCheck" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">71</item>
- </param>
- </params>
- </plugin>
- </plugingroup>
- <plugingroup>
- <plugin name="Undo" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">90</item>
- </param>
- </params>
- </plugin>
- <plugin name="Redo" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String" >CTRL</item>
- <item type="integer" >89</item>
- </param>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="String">SHIFT</item>
- <item type="Integer">90</item>
- </param>
- </params>
- </plugin>
- <plugin name="Spacer"/>
- <plugin name="Find" acl="*"/>
- <plugin name="Replace" acl="*"/>
- <plugin name="Spacer"/>
- <plugin name="SelectAll" acl="*"/>
- <plugin name="RemoveFormat" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Form" acl="*"/>
- <plugin name="Checkbox" acl="*"/>
- <plugin name="Radio" acl="*"/>
- <plugin name="TextField" acl="*"/>
- <plugin name="Textarea" acl="*"/>
- <plugin name="Select" acl="*"/>
- <plugin name="Button" acl="*"/>
- <plugin name="HiddenField" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name = "Break"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Bold" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">66</item>
- </param>
- </params>
- </plugin>
- <plugin name="Italic" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">73</item>
- </param>
- </params>
- </plugin>
- <plugin name="Underline" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">85</item>
- </param>
- </params>
- </plugin>
- <plugin name="StrikeThrough" acl="*"/>
- <plugin name="Spacer"/>
- <plugin name="Subscript" acl="*"/>
- <plugin name="Superscript" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="OrderedList" acl="*"/>
- <plugin name="UnorderedList" acl="*"/>
- <plugin name="Spacer"/>
- <plugin name="Outdent" acl="*"/>
- <plugin name="Indent" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="JustifyLeft" acl="*"/>
- <plugin name="JustifyCenter" acl="*"/>
- <plugin name="JustifyRight" acl="*"/>
- <plugin name="JustifyFull" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Link" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">76</item>
- </param>
- </params>
- </plugin>
- <plugin name="JLink" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="String">SHIFT</item>
- <item type="Integer">76</item>
- </param>
- </params>
- </plugin>
- <plugin name="Unlink" acl="*"/>
- <plugin name="Anchor" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="TextColor" acl="*">
- <params>
- <param name="FontColors" value="000000, 993300, 333300, 003300, 003366, 000080, 333399, 333333, 800000, FF6600, 808000, 808080, 008080, 0000FF, 666699, 808080, FF0000, FF9900, 99CC00, 339966, 33CCCC, 3366FF, 800080, 999999, FF00FF, FFCC00, FFFF00, 00FF00, 00FFFF, 00CCFF, 993366, C0C0C0, FF99CC, FFCC99, FFFF99, CCFFCC, CCFFFF, 99CCFF, CC99FF, FFFFFF" />
- </params>
- </plugin>
- <plugin name="BGColor" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Table" acl="*"/>
- <plugin name="Rule" acl="*"/>
- <plugin name="Smiley" acl="*"/>
- <plugin name="SpecialChar" acl="*"/>
- <plugin name="PageBreak" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name = "Break"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Style" acl="*"/>
- <plugin name="FontFormat" acl="*">
- <params>
- <param name="FontFormats" value="p;div;pre;address;h1;h2;h3;h4;h5;h6" />
- </params>
- </plugin>
- <plugin name="FontName" acl="*">
- <params>
- <param name="FontNames" value="Arial ;Courier New ;Tahoma ;Times New Roman ;Verdana" />
- </params>
- </plugin>
- <plugin name="FontSize" acl="*">
- <params>
- <param name="FontSizes" value="8;9;10;11;12;14;16;18;20;22;24;26;28;36;48;smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large" />
- </params>
- </plugin>
- </plugingroup>
- <plugingroup>
- <plugin name="FitWindow" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="String">ALT</item>
- <item type="Integer">13</item>
- </param>
- </params>
- </plugin>
- </plugingroup>
- <plugingroup>
- <plugin name="Spacer" acl="*"/>
- <plugin name="About" acl="*"/>
- <plugin name="GeSHiPro" acl="*"/>
- </plugingroup>
- </plugingroups>
- </toolbar>
- <toolbar name="Blog">
- <plugingroups>
- <plugingroup>
- <plugin name="Bold" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">66</item>
- </param>
- </params>
- </plugin>
- <plugin name="Italic" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">73</item>
- </param>
- </params>
- </plugin>
- <plugin name="Underline" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">85</item>
- </param>
- </params>
- </plugin>
- <plugin name="Spacer"/>
- <plugin name="OrderedList" acl="*"/>
- <plugin name="UnorderedList" acl="*"/>
- </plugingroup>
- <plugingroup>
- <plugin name="Cut" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">88</item>
- </param>
- <param name="KeyStrokes" >
- <item type="String">SHIFT</item>
- <item type="Integer">46</item>
- </param>
- </params>
- </plugin>
- <plugin name="Copy" acl="*"/>
- <plugin name="Paste" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">86</item>
- </param>
- <param name="KeyStrokes" >
- <item type="String">SHIFT</item>
- <item type="Integer">45</item>
- </param>
- </params>
- </plugin>
- <plugin name="PasteText" acl="*"/>
- <plugin name="PasteWord" acl="*"/>
- <plugin name="Spacer"/>
- <plugin name="SpellCheck" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">86</item>
- </param>
- </params>
- </plugin>
- </plugingroup>
- <plugingroup>
- <plugin name = "Break"/>
- </plugingroup>
- <plugingroup>
- <plugin name="BGColor" acl="*"/>
- <plugin name="RemoveFormat" acl="*"/>
- <plugin name="Spacer"/>
- <plugin name="Undo" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">90</item>
- </param>
- </params>
- </plugin>
- <plugin name="Redo" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String" >CTRL</item>
- <item type="integer" >89</item>
- </param>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="String">SHIFT</item>
- <item type="Integer">90</item>
- </param>
- </params>
- </plugin>
- </plugingroup>
- <plugingroup>
- <plugin name="Link" acl="*">
- <params>
- <param name="KeyStrokes" >
- <item type="String">CTRL</item>
- <item type="Integer">76</item>
- </param>
- </params>
- </plugin>
- <plugin name="Unlink" acl="*"/>
- <plugin name="Spacer" />
- <plugin name="About" acl="*"/>
- <plugin name="GeSHiPro" acl="*"/>
- </plugingroup>
- </plugingroups>
- </toolbar>
- </toolbarsets>
- <customplugins>
- <add name="formatsource" lang="en,es,fr,it,ko,nl,pt,ru,za,zh"/>
- <add name="stylesheet" lang="en"/>
- <add name="jlink" lang="en,es,fr,it,ko,nl,pt,ru,za,zh"/>
- <add name="istyles" lang="en" basepath="FCKBasePath"/>
- <add name="pspellcheck"/>
- <add name="nodepath"/>
- <add name="ImageManager" lang="de,en,fr,nl,no,pl,ru,sv" />
- <add name="geshipro" lang="en" />
- </customplugins>
- </config>
Screen Shots


Main Menu
Contacts
If you would like to contact me regarding the range of serves that I can offer. Please use the details below.
Office: 01767 631679
email: Shaun Freeman
Ubuntu
Donate
Links
Site Specs
Site best viewed in a screen resolution of 1024x768 & 32 bit colours or higher using the latest version of Firefox
