Textile editor helper plugin

Plugin details

The Textile Editor Helper or TEH is a Javascript-based text formatting toolbar that allows you to add a WYSIWYG text area that makes use of Textile type markup.

Websitehttp://slateinfo.blogs.wvu.edu/plugins/textile_editor_helper Repositoryhttp://svn.webtest.wvu.edu/repos/rails/plugins/textile_editor_helper/ Author Dave Olsen, Chris Scharf Tags FormHelper, WYSIWYG, Textile, Prototype LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://svn.webtest.wvu.edu/repos/rails/plugins/textile_editor_helper/

Install

rake textile_editor_helper:install



Firstly make sure you have included prototype in your app

For the textarea(s) that you want to add the TEH toolbar to replace the text area tag with:

<%= textile_editor 'object', 'field' -%>



At the end of your form put in the following code:

<%= textile_editor_initialize -%>



== Simple vs. Extended

TEH has a built-in mode to show only a sub-selection of available tags called simple. Currently the 'simple' tags are: bold, underline, italic, strikethrough. To create a text area that will only use the 'simple' tags create your text area with the following code:

<%= textile_editor 'object', 'field', :simple -%>



== To modify Textile Editor Helper
Most of the options that you might want to modify (e.g. access keystroke or whether a tag is available in simple) are found in textile_editor_config.js. Pretty straightforward.

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: scott, 5 months ago