API16

JEditor/getInstance

< API16:JEditor

The "API16" 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

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


<! removed transcluded page call, red link never existed >

Syntax

static getInstance($editor= 'none')
Parameter Name Default Value Description
$editor 'none' $editor The editor to use.

Returns

The Editor object. 

Defined in

libraries/joomla/html/editor.php

Importing

jimport( 'joomla.html.editor' );

Source Body

public static function getInstance($editor = 'none')
{
        static $instances;

        if (!isset ($instances)) {
                $instances = array ();
        }

        $signature = serialize($editor);

        if (empty ($instances[$signature])) {
                $instances[$signature] = new JEditor($editor);
        }

        return $instances[$signature];
}


<! removed transcluded page call, red link never existed >

Examples

Code Examples


Advertisement