Class JEditor

Description

JEditor class to handle WYSIWYG editors

  • since: 11.1

Located in /libraries/joomla/html/editor.php (line 21)

JObject
   |
   --JEditor
Variable Summary
static array $instances
string $asset
string $author
object $_editor
array $_methods
string $_name
array $_observers
mixed $_state
Method Summary
static object 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 79)
  • var: JEditor instances container.
  • since: 11.3
  • access: protected
string $asset = null (line 66)

Object asset

  • access: protected
string $author = null (line 73)

Object author

  • access: protected
object $_editor = null (line 52)

Editor Plugin object

  • access: protected
array $_methods = array() (line 45)

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

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

Editor Plugin name

  • access: protected
array $_observers = array() (line 29)

An array of Observer objects to notify

  • since: 11.1
  • access: protected
mixed $_state = null (line 37)

The state of the observable object

  • since: 11.1
  • access: protected

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
static method getInstance (line 101)

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

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

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 134)

Attach an observer object

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

Detach an observer object

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

Display the editor area.

  • since: 11.1
  • 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: 11.1
  • 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: 11.1
  • access: public
string getContent (string $editor)
  • string $editor: The name of the editor control
getState (line 120)

Get the state of the JEditor object

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

Initialise the editor

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

Save the editor content

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

Set the editor contents

  • since: 11.1
  • 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: 11.1
  • 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()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:54:24 -0500 by phpDocumentor 1.4.4