A range of screenshots of JSnippets administrative pages and in action.

This project is not covered by Drupal’s security advisory policy.

The JSnippets module can be used to insert code snippets, general text templates and so on into specified Drupal textareas. Snippets can be related to textareas in forms, using the element ID of the textarea and the form ID of the form. These can be obtained by way of the JSnippets section button which should be visible above all textareas for users with the 'administer jsnippets' permission. Only users with the 'use jsnippets' permission are allowed access to the snippets.

This module uses JavaScript in combination with XMLHTTP and JSON to retrieve and insert the snippets. It will not work without JavaScript.

Example use cases:

  • Inserting canned (consistent) comments / replies to users.
  • Library of PHP code snippets.
  • Create templates for administrative fields such as site off-line messages

Bug reports and other feedback are always welcome.

Initially sponsored by: Chris Meryck.

Project information

Releases