Class JEditor

Description

JEditor class to handle WYSIWYG editors

  • since: 1.5

Located in /libraries/cms/editor/editor.php (line 19)

JObject
   |
   --JEditor
Variable Summary
 static array $instances
 string $asset
 string $author
 object $_editor
 array $_methods
 string $_name
 array $_observers
 mixed $_state
Method Summary
 static JEditor getInstance ([string $editor = 'none'])
 JEditor __construct ([string $editor = 'none'])
 void attach (object $observer)
 boolean detach (object $observer)
 string display (string $name, string $html, string $width, string $height, integer $col, integer $row, [boolean $buttons = true], [string $id = null], [string $asset = null], [object $author = null], [array $params = array()])
 array getButtons (string $editor, [mixed $buttons = true])
 string getContent (string $editor)
 mixed getState ()
 void initialise ()
 string save (string $editor)
 string setContent (string $editor, string $html)
 mixed _loadEditor ([array $config = array()])
Variables
static array $instances = array() (line 81)
  • var: JEditor instances container.
  • since: 2.5
  • access: protected
string $asset = null (line 67)

Object asset

  • since: 1.6
  • access: protected
string $author = null (line 75)

Object author

  • since: 1.6
  • access: protected
object $_editor = null (line 51)

Editor Plugin object

  • since: 1.5
  • access: protected
array $_methods = array() (line 43)

A multi dimensional array of [function][] = key for observers

  • since: 1.5
  • access: protected
string $_name = null (line 59)

Editor Plugin name

  • since: 1.5
  • access: protected
array $_observers = array() (line 27)

An array of Observer objects to notify

  • since: 1.5
  • access: protected
mixed $_state = null (line 35)

The state of the observable object

  • since: 1.5
  • access: protected

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
static getInstance (line 103)

Returns the global Editor object, only creating it if it doesn't already exist.

  • return: The Editor object.
  • since: 1.5
  • access: public
static JEditor getInstance ([string $editor = 'none'])
  • string $editor: The editor to use.
Constructor __construct (line 88)

Constructor

  • access: public
JEditor __construct ([string $editor = 'none'])
  • string $editor: The editor name

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
attach (line 136)

Attach an observer object

  • since: 1.5
  • access: public
void attach (object $observer)
  • object $observer: An observer object to attach
detach (line 204)

Detach an observer object

  • return: True if the observer object was detached.
  • since: 1.5
  • access: public
boolean detach (object $observer)
  • object $observer: An observer object to detach.
display (line 281)

Display the editor area.

  • since: 1.5
  • access: public
string display (string $name, string $html, string $width, string $height, integer $col, integer $row, [boolean $buttons = true], [string $id = null], [string $asset = null], [object $author = null], [array $params = array()])
  • string $name: The control name.
  • string $html: The contents of the text area.
  • string $width: The width of the text area (px or %).
  • string $height: The height of the text area (px or %).
  • integer $col: The number of columns for the textarea.
  • integer $row: The number of rows for the textarea.
  • boolean $buttons: True and the editor buttons will be displayed.
  • string $id: An optional ID for the textarea (note: since 1.6). If not supplied the name is used.
  • string $asset: The object asset
  • object $author: The author.
  • array $params: Associative array of editor parameters.
getButtons (line 431)

Get the editor extended buttons (usually from plugins)

  • since: 1.5
  • access: public
array getButtons (string $editor, [mixed $buttons = true])
  • string $editor: The name of the editor.
  • mixed $buttons: Can be boolean or array, if boolean defines if the buttons are displayed, if array defines a list of buttons not to show.
getContent (line 367)

Get the editor contents

  • since: 1.5
  • access: public
string getContent (string $editor)
  • string $editor: The name of the editor control
getState (line 122)

Get the state of the JEditor object

  • return: The state of the object.
  • since: 1.5
  • access: public
mixed getState ()
initialise (line 236)

Initialise the editor

  • since: 1.5
  • access: public
void initialise ()
save (line 331)

Save the editor content

  • since: 1.5
  • access: public
string save (string $editor)
  • string $editor: The name of the editor control
setContent (line 398)

Set the editor contents

  • since: 1.5
  • access: public
string setContent (string $editor, string $html)
  • string $editor: The name of the editor control
  • string $html: The contents of the text area
_loadEditor (line 477)

Load the editor

  • since: 1.5
  • access: protected
mixed _loadEditor ([array $config = array()])
  • array $config: Associative array of editor config paramaters

Inherited Methods

Inherited From JObject

 JObject::__construct()
 JObject::def()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::__toString()

Documentation generated on Tue, 19 Nov 2013 15:02:14 +0100 by phpDocumentor 1.4.3