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


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

Detailed Description

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


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


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

It is good practice to use "rte" as classname for rich text editors.
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:

 $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.