This module functions pretty much like the image manager for popular wysiwyg editors except that instead of working with images, this one works with codes (code browser). It stores code fragments that can be edited/created from the wysiwyg editor. The code fragments are stored in the content using tags. These codes can also be reused on other nodes.

Codes fragments are syntax-highlighted using the Geshi filter module.

Installation

1) Enable the Code Snippet module
2) Enable the filter to use code snippets
3) Configure TinyMCE to have the Code snippet button added

The <> button should appear on the TinyMce editor.

Tag format

[snippet|type=drupal6|csid=13|tagstyle=block|lineNumbering=2|numberStart=301]

  • csid: The only required attribute (but untested if others are absent). The database ID
  • type : Only here for image styling inside TinyMCE, the filter uses the value stored in the database
  • tagstyle: Helps controls the formatting and this data is saved in the tag, see the GeSHi Filter docs for more details.
  • lineNumbering: See the GeSHi Filter docs.
  • numberStart : See the GeSHi Filter docs.

Dependencies

  1. Geshi Filter
  2. WYSIWYG
  3. tinymce

Release 1.1

This new release comes with an advanced code browser and editor.

You can now create code snippets when creating a new node as opposed to the previous version which worked when editing nodes only.

I do not see myself using any other editors, so if anyone wants to implement code snippet with another editor, please submit a patch.

Downloads

Recommended releases

Version Downloads Date Links
6.x-1.1 tar.gz (14.76 KB) | zip (18.29 KB) 2010-May-08 Notes

Development releases

Version Downloads Date Links
6.x-1.x-dev tar.gz (14.43 KB) | zip (17.6 KB) 2011-Feb-25 Notes

Project Information


Maintainers for GeSHi code snippets

  • Arshad Chummun - 2 commits
    last: 1 year ago, first: 1 year ago
  • Alan D. - 1 commit
    last: 2 years ago, first: 2 years ago

Issues for GeSHi code snippets

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Oldest open issue: 28 Jun 10
nobody click here