Drupal Association members fund grants that make connections all over the world.
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.
- Enable the Code Snippet module
- Enable the filter to use code snippets
- Configure TinyMCE to have the Code snippet button added
The <> button should appear on the TinyMCE editor.
- 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.
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.
- Maintenance status: Minimally maintained
- Development status: Maintenance fixes only
- Reported installs: 20 sites currently report using this module. View usage statistics.
- Downloads: 2,697
- Last modified: November 27, 2014
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.