Book
- Drupal - Installation
- Drupal - Localization
- Drupal - Administration
- Drupal - Optimization
- Drupal - Security
- Drupal - Look and Feel
- Drupal - Garland Adjustments
- Drupal - CSS Tweaks
- Drupal - Outlook of Forms
- Drupal - Form Behavior
- Drupal - Node Form Buttons
- Drupal - jQuery
- Drupal - ExtJS
- Drupal - Custom Themes
- Drupal - Miscellaneous Themes
- Drupal - Superfish Menus
- Drupal - Contemplate
- Drupal - Iconizer
- Drupal - On Mobile Devices
- Drupal - More Look and Feel
- Drupal - Hierarchical Select
- Drupal - Panels
- Drupal - Zen Theme
- Drupal - jCarousel
- Flash with Drupal
- PSD-to-CSS online converter
- Drupal - Uploads
- Drupal - Navigation
- Drupal - Bookmarks (per-user menu)
- Drupal - Click Path
- Drupal - Keyboard Shortcuts
- Drupal - Flagging (and bookmarking)
- Drupal - Outline Designer
- Drupal - Recent Changes
- Drupal - Relevant Content
- Drupal - Simple Menu
- Drupal - Other Menu Modules
- Drupal - Other Navigation Modules
- Drupal - Russian search and keywords
- Drupal - Web Links
- Drupal - Improvements
- Drupal - Taxonomy and Views
- Drupal - Input Formats
- Drupal - Images
- Drupal - Data Presentation
- Drupal - Multimedia
- Drupal - Gadgets
- Drupal - Data Analysis
- Drupal - Geospatial
- Drupal - FAQ
- Drupal Resources
Drupal - GeSHi Syntax Highlighter
GeSHi filter
module provides a filter for source code syntax highlighting for a wide range of languages.This module requires third-party GeSHi (Generic Syntax Highlighter) PHP library (1.0.x branch).
After installation go to "administer > site configuration > geshi filter". For compatibility Wiki filter check the "try to auto-configure other filters" option and enable the filter on the wiki input format. Make sure that filters have the order: PEAR wiki filter >> Template filter >> GeSHi filter.
It is not easy to integrate GeSHI with Wysywyg (another story). The problem is that FCKEditor converts all special html characters to html entities and then geshi forces these to output to to browser as literal text.
Solution:I still haven't found the perfect solution but this is what I did to make things work better:
- To allow us to easily use the geshi filter styles, add custom styles to the style menu by editing fckstyles.xml (I set up 3 styles - php html and css, commits 498, 502, 508, 510):
- <Style type="text/css" name="Php Code block" element="code">
- <Attribute name="language" value="php"></Attribute>
- </Style>
- <Style type="text/css" name="HTML Code block" element="code">
- <Attribute name="language" value="html"></Attribute>
- </Style>
- <Style type="text/css" name="CSS Code block" element="code">
- <Attribute name="language" value="css"></Attribute>
- </Style>
- To stop FCKEditor messing things up when switching between source and WYSIWYG views, you need to add this to your fckeditor.config.js file:
- FCKConfig.ProtectedSource.Add( /<(code|blockcode|codeblock)[\s\S]*?\/(code|blockcode|codeblock)>/g );
Another solution is GeshiPro plugin
(download v1.2 from github, commits 505, 506, 507). This solution has a drawback: the code block is formatted when it's inserted, and after that you don't have control over it.

Comments
BTW, later I ceased to use and configured GeSHi to use .... The good thing is that FCKeditor keeps formatting of sections by default. Only s have to be configured, in an evident manner.
From what I see on your page, it does not work because you use the tag itself to carry language name, e.g. or instead of as described here. For your case to work I would suggest this regular expression
FCKConfig.ProtectedSource.Add( /<(php|vbs|c)[\s\S]*?\/(php|vbs|c)>/g );
Thanks, but adding this line does'nt work for me. I have to add code for specific language.
http://www.techpint.com/programming/syntax-highlighting-using-geshi-filt...
Post new comment