Experimental project

This is a sandbox project, which contains experimental code for developer use only.

ABOUT

Allows to use GeSHi Filter with Wysiwyg module for Drupal 7 and CKEditor.


Need help to port it as a full module.

Screenshots

Tested with:

Drupal 7.17

GeSHi 1.0.8.11

ckeditor 3.6.5

Wysiwyg 7.x-2.2

GeSHi Filter 7.x-1.1

wysiwyg_filter 7.x-1.6-rc2

INSTALLATION

  1. Install as usual "Wysiwyg" from http://drupal.org/project/wysiwyg
  2. Install as usual "GeSHi Filter" from http://drupal.org/project/geshifilter
  3. Download CKEditor library and copy folder "ckeditor" from archive to "sites/all/libraries"
  4. Download GeSHi library version of the branch 1.0.x and copy folder "geshi" from archive to "sites/all/libraries"
  5. Install as usual "Wysiwyg Geshi Plugin"
  6. Configure "Wysiwyg" module via http://YOUR_SITE/admin/settings/wysiwyg for needed "Input format". Add "GeSHi" button to list.
  7. Configure "GeSHi Filter" module via http://YOUR_SITE/admin/config/content/formats/geshifilter for needed "Input format". Add "pre" tag.
  8. In file /sites/all/modules/geshifilter/geshifilter.pages.inc add this line:
    @@ -248,6 +248,8 @@
     
       // Undo linebreak and escaping from preparation phase.
       $source_code = decode_entities($source_code);
    
    +  $source_code = htmlspecialchars_decode($source_code, ENT_QUOTES);
     
       // Initialize to default settings.
       $lang = variable_get('geshifilter_default_highlighting', GESHIFILTER_DEFAULT_PLAINTEXT);
    
    
  9. If you use WYSIWYG Filter enable this tag:
    pre[start|fancy|type|linenumbers<off?fancy?normal|title]
    
  10. ???????
  11. PROFIT :)

INFO

Based on the example in this article.

Project information