cms_textarea

   Purpose

This Smarty plugin is used when building admin forms to generate a textarea field. It has various parameter which allow controlling whether a WYSIWYG plugin is used (if available) or a syntax highlighter, and for influencing the behavior of those modules, and the size and appearance of the textarea.

   Usage

The simplest way to use this plugin is by specifying {cms_textarea name="something"}. This will create a simple text area without WYSIWYG or syntax highlighter modules enabled, with the specified name.

Next, you can specify the default value for the text area by using the "text" or "value" parameters.

   Available parameters

  • name - required string : name attribute for the text area element.
  • prefix - optional string : optional prefix for the name attribute.
  • class - optional string : class attribute for the text area element. Additional classes may be added automatically.
  • classname - alias for the class parameter.
  • forcemodule - optional string : used to specify the WYSIWYG or syntax highlighter module to enable. If specified, and available, the module name will be added o the class attribute.
  • enablewysiwyg - optional boolean : used to specify whether a WYSIWYG textarea is required. Sets the language to "html"
  • wantedsyntax - optional string used to specify the language (html,css,php,smarty...) to use. If non empty indicates that a syntax highlighter module is requested.
  • type - alias for the wantedsyntax parameter.
  • cols - optional integer : columns of the text area (admin theme css or the syntax/WYSIWYG module may override this).
  • width - alias for the cols parameter.
  • rows - optional integer : rows of the text area (admin theme css or the syntax/WYSIWYG module may override this).
  • height - alias for the rows parameter.
  • maxlength - optional integer : maxlength attribute of the text area (syntax/WYSIWYG module may ignore this).
  • required - optional boolean : indicates a required field.
  • placeholder - optional string : placeholder attribute of the text area (syntax/WYSIWYG module may ignore this).
  • value - optional string : default text for the text area, will undergo entity conversion.
  • text - alias for the value parameter
  • cssname - optional string : pass this stylesheet name to the WYSIWYG module if a WYSIWYG module is enabled.
  • addtext - optional string : additional text to add to the textarea tag.
  • assign - optional string : assign the output html to the named Smarty variable.