Actions

JFactory/getEditor

From Joomla! Documentation

Revision as of 10:25, 26 May 2009 by Eitamar (Talk | contribs)

Returns a reference to the global editor object, only creating it if it doesn't already exist. The object returned will be of type JEditor.

Contents

Syntax

object JEditor getEditor( $editor )

where:

Argument Data type Description Default
$editor string The name of the editor (for example, 'tinymce'). If null then the current editor will be returned. null

Example

In this example, the current editor is returned. TODO: Need a better example.

$editor =& JFactory::getEditor();

Display Example

In this example, you can see how to display the editor and send specific display parameters.

$editor =& JFactory::getEditor();
$params = array('smilies'=> '0' ,
                'style'=> '1' ,  
                'layer'=> '0' , 
                'table'=> '0' ,
                'clear_entities'=>'0'
                );
echo $editor->display("desc",'','400','400','20','20', false ,$params);

See also