.

CKEditor
[JavaScript]

Include CKEditor (http://ckeditor.com/). More...

Classes

class   CKEditor
  Component to include CKEditor on your page. More...
class   CKEditorConfig
  CKEditor config. More...

Detailed Description

Include CKEditor (http://ckeditor.com/).

Usage

On install, the module copies CKEditor files to the a folder named "js/ckeditor" below web root. The version of CKEditor installed is 3.5.3.

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

 Load::components('ckeditor');
 CKEditor::enable($page_data);

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

Note:
It is good practice to use "rte" as classname for rich text editors.
Attention:
The above code only works if javascript.jquery module is enabled, too. If you don't user jQuery, you must create you own configuration.

Creating Configurations

If the default configuration is not sufficent, 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('ckeditor');
 $config CKEditor::create_config('fancy');
 $config->init_file = 'js/fancy_ck.js'; // JS script to fire up editor

You now can use the config anywhere:

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

Additional notes

CKEditor is released under GPL, LGPL and MPL license.