From Joomla! Documentation

< API16:JEditor
Revision as of 16:49, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.


Display the editor area.

[Edit Descripton]



display($name, $html, $width, $height, $col, $row, $buttons=true, $id=null, $params=array())
Parameter Name Default Value Description
$name The control name.
$html The contents of the text area.
$width The width of the text area (px or %).
$height The height of the text area (px or %).
$col The number of columns for the textarea.
$row The number of rows for the textarea.
$buttons true True and the editor buttons will be displayed.
$id null An optional ID for the textarea (note: since 1.6). If not supplied the name is used.
$params array() Associative array of editor parameters.

Defined in



jimport( 'joomla.html.editor' );

Source Body

public function display($name, $html, $width, $height, $col, $row, $buttons = true, $id = null, $params = array())
        //check if editor is already loaded
        if (is_null(($this->_editor))) {
        // Backwards compatibility. Width and height should be passed without a semicolon from now on.
        // If editor plugins need a unit like "px" for CSS styling, they need to take care of that
        $width  = str_replace(';', '', $width);
        $height = str_replace(';', '', $height);
        // Initialise variables.
        $return = null;
        $args['name']           = $name;
        $args['content']        = $html;
        $args['width']          = $width;
        $args['height']         = $height;
        $args['col']            = $col;
        $args['row']            = $row;
        $args['buttons']        = $buttons;
        $args['id']                     = $id ? $id : $name;
        $args['event']          = 'onDisplay';
        $results[] = $this->_editor->update($args);
        foreach ($results as $result) {
                if (trim($result)) {
                        $return .= $result;
        return $return;

[Edit See Also] SeeAlso:JEditor/display


<CodeExamplesForm />