Dynamically insert pre-defined text strings into nodes or comments.

Canned Texts creates a views generated drop-down list widget in the node-form and/or comment-form. By selecting a list item, text is dynamically inserted into the node and/or comment text-area fields, at the point of the cursor. Canned Texts works with the views module and adds a new "display" to the views module called "Canned Texts". The "Canned Texts" display provides widget settings for:

  • Node Type: Select which node type the widget will appear on.
  • Show in: Select if the widget should appear in the comment form or node form.
  • Show title: Select if the view title should be shown above the widget.

Notes:

  • The widget will not be displayed if there is no content to load.
  • The widget will not be displayed if the user has no access permissions to the "Canned Text" view.
  • The text will not be pasted if the user has no access permissions to the "Canned Text" nodes.

Step to Step: How to build a Canned Text Widget

  • Create a new View. Select as base table, node or comment.
  • Define filters to filter all the node/comments that you want to list in the select field.
  • Define the fields to that will populate the widget drop-list items. Usually Node: Title is enough.
  • Add a new display of type: Canned Text
  • Configure this display to set where the widget will appear, and other options
  • Save the view

The widget will be inserted into the node or comment forms of the node types you have defined.

You can define the position of the Canned Text widget in Administer > Content Management > Content Types > Your content type > Edit.

The access to the widget is controlled by the access to the view display. Remember:

  • The widget will not be displayed if there is no content to load.
  • The widget will not be displayed if the user has no access permissions to the "Canned Text" view.
  • The text will not be pasted if the user has no access permissions to the "Canned Text" nodes.

Download: http://drupal.org/project/canned_texts