Joomla! 1.5 API

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2011 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 Class JEditor

Description

JEditor class to handle WYSIWYG editors

  • since: 1.5

Located in /joomla/html/editor.php (line 27)

Class JObject   (Subpackage Base)

Abstract class JObservable   (Subpackage Base)
   
   Class JEditor   (Subpackage HTML)
Variable Summary
Variable object $_editor
Variable string $_name
Variable array $_tagForSEF
Method Summary
Constructor JEditor __construct ([string $editor = 'none'])
Method void display (string $name, string $html, string $width, string $height, int $col, int $row, [boolean $buttons = true], [array $params = array()])
Method void getButtons ( $editor, [mixed $buttons = true])
Method void getContent (string $editor)
Method JEditor &getInstance ([string $editor = 'none'])
Method void initialise ()
Method void save (string $editor)
Method void setContent (string $editor, string $html)
Variables
object $_editor = null (line 34)

Editor Plugin object

string $_name = null (line 41)

Editor Plugin name

array $_tagForSEF = array('start' => '<!-- Start Editor -->', 'end' => '<!-- End Editor -->') (line 48)

Editor start and end tag

Used to tell SEF plugin not to process editor contents

Inherited Variables

Inherited from JObject

Variable JObject::$_errors
Methods
Constructor __construct (line 56)

constructor

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

Redefinition of:
JObservable::__construct()
Constructor
display (line 126)

Present a text area

void display (string $name, string $html, string $width, string $height, int $col, int $row, [boolean $buttons = true], [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 %)
  • int $col: The number of columns for the textarea
  • int $row: The number of rows for the textarea
  • boolean $buttons: True and the editor buttons will be displayed
  • array $params: Associative array of editor parameters
getButtons (line 243)

Get the editor buttons

  • since: 1.5
  • access: public
void getButtons ( $editor, [mixed $buttons = true])
  • 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.
  • $editor
getContent (line 195)

Get the editor contents

void getContent (string $editor)
  • string $editor: The name of the editor control
getInstance (line 72)

Returns a reference to a global Editor object, only creating it if it doesn't already exist.

This method must be invoked as:

  $editor = &JEditor::getInstance([$editor);

  • return: The Editor object.
  • access: public
JEditor &getInstance ([string $editor = 'none'])
  • string $editor: The editor to use.
initialise (line 92)

Initialize the editor

void initialise ()
save (line 168)

Save the editor content

void save (string $editor)
  • string $editor: The name of the editor control
setContent (line 218)

Set the editor contents

void setContent (string $editor, string $html)
  • string $editor: The name of the editor control
  • string $html: The contents of the text area

Inherited Methods

Inherited From JObservable

 JObservable::__construct()
 JObservable::attach()
 JObservable::detach()
 JObservable::getState()
 JObservable::notify()

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::getPublicProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::toString()
Support Joomla!