.

CLEditor Class Reference
[CLEditor]

Component to include CLEditor 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 CLEditor, 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 CLEditor on your page.

Author:
Gerd Riesselmann

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


Member Function Documentation

static CLEditor::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:
CLEditorConfig

Definition at line 39 of file cleditor.cls.php.

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

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

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

00016                                                                                          {
00017                 if (!$config instanceof CLEditorConfig) {
00018                         $config = self::get_config($config);
00019                 }
00020 
00021                 if ($config->lang) {
00022                         $page_data->head->add_js_file('js/cleditor/lang/jquery.cleditor.' . strtolower($config->lang) . '.js');
00023                 }
00024                 $page_data->head->add_js_file('js/cleditor/jquery.cleditor.js');
00025                 $page_data->head->add_css_file('js/cleditor/jquery.cleditor.css');
00026                 foreach($config->plugins as $p) {
00027                         $page_data->head->add_js_file($p);
00028                 }
00029                 $page_data->head->add_js_file($config->init_file);
00030         }
static CLEditor::get_all_configs (  )  [static]

Returns all configs.

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

Definition at line 65 of file cleditor.cls.php.

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

Member Data Documentation

const CLEditor::CONFIG_DEFAULT = 'default'

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


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