.

CKEditor Class Reference
[CKEditor]

Component to include CKEditor on your page. More...

List of all members.

Static Public Member Functions

static  create_config ($name, $template=self::CONFIG_DEFAULT)
  Create a new config.
static  enable (PageData $page_data, $config=self::CONFIG_DEFAULT)
  Enable CKEditor, and use given javascript file, to invoke it.
static  get_all_configs ()
  Returns all configs.

Public Attributes

const  CONFIG_DEFAULT = 'default'

Detailed Description

Component to include CKEditor on your page.

Author:
Gerd Riesselmann

Definition at line 8 of file ckeditor.cls.php.


Member Function Documentation

static CKEditor::create_config ( name,
template = self::CONFIG_DEFAULT  
) [static]

Create a new config.

Parameters:
sring  $name
string  $template Name of config to use as template
Returns:
CKEditorConfig

Definition at line 40 of file ckeditor.cls.php.

00040                                                                                     {
00041                 $template = self::get_config($template);
00042                 self::$configs[$name] = $template;
00043                 HtmlText::register_editor($name, $template);
00044                 return $template; 
00045         }
static CKEditor::enable ( PageData page_data,
config = self::CONFIG_DEFAULT  
) [static]

Enable CKEditor, and use given javascript file, to invoke it.

Definition at line 16 of file ckeditor.cls.php.

00016                                                                                          {
00017                 if (!$config instanceof CKEditorConfig) {
00018                         $config = self::get_config($config);
00019                 }
00020                 
00021                 $page_data->head->add_js_file('js/ckeditor/ckeditor.js');
00022                 if (Load::is_module_loaded('javascript.jquery')) {
00023                         $page_data->head->add_js_file('js/ckeditor/adapters/jquery.js');
00024                 }
00025                 
00026                 $page_data->head->add_js_file($config->init_file);
00027                 
00028                 // CKEditor path mus be set, else compressed version will not work
00029                 $path = Config::get_value(Config::URL_BASEDIR) . 'js/ckeditor/';
00030                 $page_data->head->add_js_snippet("var CKEDITOR_BASEPATH = '$path';", true);             
00031         }
static CKEditor::get_all_configs (  )  [static]

Returns all configs.

Returns:
array Array with config names as keys and CKEditorConfig instances as values

Definition at line 66 of file ckeditor.cls.php.

00066                                                  {
00067                 return self::$configs;
00068         }

Member Data Documentation

const CKEditor::CONFIG_DEFAULT = 'default'

Definition at line 9 of file ckeditor.cls.php.


The documentation for this class was generated from the following file: