UserGuide: BetterEditor plugin

Difference between revisions from 2011/05/08 19:18 and 2009/12/15 20:03.
{include:subpage plugins}
BetterEditor plugin provides two distinct editor features:
* toolbar with most common syntax features
* arrows resizing textarea (useful especially when editing with Ajax)

There may be other editor related features in the future.

!Integration into templates
Right now, only dandelion template has built-in support for templates, however integration into other templates is embarrassingly easy:


on some suitable position and that's it.

[Comments|UserGuide: Comments plugin] and [AjaxEditing|UserGuide: AjaxEditing plugin] plugins have its own templates, in ''plugins/Comments/template.html'' and ''plugins/AjaxEditing/template.html'' respectively -- you can alter them too.

!Customization, localization
If you know a little bit of PHP and JavaScript, you can easily modify it. Syntax is inserted with Javascript method
{{function insertSyntax(obj, otag, ctag, content)}}
* obj should be ''this'', i.e. object on which was click event triggered
* otag is short for ''opening tag'', i.e. prefix to selected text
* ctag is short for ''closing tag''
* content contains example "center" text (between the opening and closing tags) which is inserted when no text was selected prior to clicking on the toolbar button

Toolbar definition is placed right in the plugin source code in ''plugins/BetterEditor'' plugin.

Plugin is also completely localizable, translations are welcomed.

{tags:userguide, plugin}