CKEditor - GeSHi filter bridge

Component ID

1832894

Component name

CKEditor - GeSHi filter bridge

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Important: This module is based on Aren Cambre work WYSIWYG - GeSHi bridge and nearly all installation instructions came from this module.

NOTE:
This is my first module. I made it for my own purpose but then realize that someone could find it useful so I post it here.

Dependencies

CKEditor 7.x-1.9 module (only this version has been tested)
GeSHi Filter for syntax highlighting module

GeSHi filter hack

You must hack a GeSHi filter file. I'm talking about the code you download separately form the Drupal GeSHi module.

Under sites/[sitename or all]/modules/geshifilter/geshi, open geshi.php for editing. Add the below code after // Replace all newlines to a common form:

// Replace all newlines to a common form.
$code = str_replace(">", ">", $code);
$code = str_replace("<", "<", $code);
$code = str_replace("&", "&", $code);
$code = str_replace("'", "'", $code);
$code = str_replace(""", """, $code);

After installation you must enable the buttons:

Go to admin/config/content/ckeditor/edit (Home » Administration » Configuration » Content authoring).
Click Edit next to the profile where you want to use GeSHi.
Under Editor appearance, check "Geshi bridge for CKEditor" plugin. After saving you should be able to select the Geshi buttons for languages enabled in GeSHi Filter module.