.

CLEditor
[JavaScript]

Include CLEditor (http://premiumsoftware.net/cleditor/). More...

Classes

class   CLEditor
  Component to include CLEditor on your page. More...
class   CLEditorConfig
  CLEditor config. More...
class   JavascriptCLEditorEventSink
  EventSink to deal with JCSSManager events. More...

Detailed Description

Include CLEditor (http://premiumsoftware.net/cleditor/).

Usage

On install, the module copies CLEditor files to the a folder named "js" below web root. The version of CLEditor installed is 1.3.

CLEditor files are not included by default. To enable CLEditor on a page, place the following code

 Load::components('cleditor');
 CLEditor::enable($page_data);

This will turn all textareas with class "rte" into a CLEditor instance.

Note:
It is good practice to use "rte" as classname for rich text editors.

Creating Configurations

If the default configuration is not sufficient, you may create your own. This is a two step process:

  • Create and name a config
  • Refer to it by name when enabling editor

First, create a config:

 Load::components('cleditor');
 $config CLEditor::create_config('fancy');
 $config->init_file = 'js/fancy_cl.js'; // JS script to fire up editor
 §config->plugins = array('js/cleditor/plugins/jquery.cleditor.table.js');

You now can use the config anywhere:

 CLEditor::enable($page_data, 'fancy);

Additional notes

CLEditor is released under GPL 2, and MIT license.