JEditor/display
From Joomla! Documentation
< API15:JEditorRevision as of 17:21, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Present a text area
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
...)
Revision as of 17:21, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description===
Present a text area
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
...)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Present a text area
Template:Description:JEditor/display
Syntax[edit]
display($name, $html, $width, $height, $col, $row, $buttons=true, $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 |
$params | array() | Associative array of editor parameters |
Defined in[edit]
libraries/joomla/html/editor.php
Importing[edit]
jimport( 'joomla.html.editor' );
Source Body[edit]
function display($name, $html, $width, $height, $col, $row, $buttons = true, $params = array())
{
$this->_loadEditor($params);
//check if editor is already loaded
if(is_null(($this->_editor))) {
return;
}
// 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 );
// Initialize 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['event'] = 'onDisplay';
$results[] = $this->_editor->update($args);
foreach ($results as $result)
{
if (trim($result)) {
$return .= $result;
}
}
return $this->_tagForSEF['start'] . $return . $this->_tagForSEF['end'];
}
[Edit See Also] Template:SeeAlso:JEditor/display
Examples[edit]
<CodeExamplesForm />