editor_tiny/editor

TinyMCE Editor Manager.

Source:
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Members

(static, constant) configureDefaultEditor

Source:

Set the default editor configuration.

This configuration is used when an editor is initialised without any configuration.

(static, constant) getAllInstances

Source:

Get a list of all Editors in a Map, keyed by the DOM Node that the Editor is associated with.

(static, constant) getInstanceForElementId

Source:

Get the TinyMCE instance for the specified Node ID.

(static, constant) setupForElementId

Source:

Set up TinyMCE for the selector at the specified HTML Node id.

(static, constant) setupForTarget

Source:

Set up TinyMCE for the HTML Element.

(inner) defaultOptions :Object

Source:

The default editor configuration.

Type:
  • Object

(inner, constant) instanceMap :Map

Source:

Storage for the TinyMCE instances on the page.

Type:
  • Map

Methods

(inner) adjustEditorSize(editor, target)

Source:

Adjust the editor size base on the target element.

Parameters:
Name Type Description
editor TinyMCE

TinyMCE editor

target Node

Target element

(inner) fetchLanguage(language) → {object}

Source:

Fetch the language data for the specified language.

Parameters:
Name Type Description
language string

The language identifier

Returns:
Type
object

(inner) getEditorConfiguration(target, tinyMCE, options, pluginValues) → {object}

Source:

Fetch the TinyMCE configuration for this editor instance.

Parameters:
Name Type Description
target HTMLElement
tinyMCE TinyMCE

The TinyMCE API

options Object

The editor plugin configuration

pluginValues object
Properties
Name Type Description
pluginConfig object

The list of plugin configuration

pluginNames object

The list of plugins to load

Returns:

The TinyMCE Configuration

Type
object

(inner) getPlugins(options) → {object}

Source:

Get the list of plugins to load for the specified configuration.

If the specified configuration does not include a plugin configuration, then return the default configuration.

Parameters:
Name Type Description
options object
Properties
Name Type Attributes Default Description
plugins array <optional>
null

The plugin list

Returns:
Type
object

(inner) getStandardConfig(target, tinyMCE, options, plugins) → {object}

Source:

Get the standard configuration for the specified options.

Parameters:
Name Type Description
target Node
tinyMCE tinyMCE
options object
plugins Array
Returns:
Type
object

(async, inner) importPluginList(pluginList) → {Array.<Promise>}

Source:

Require the modules for the named set of TinyMCE plugins.

Parameters:
Name Type Description
pluginList Array.<string>

The list of plugins

Returns:

A matching set of Promises relating to the requested plugins

Type
Array.<Promise>

(async, inner) initialisePage()

Source:

Initialise the page with standard TinyMCE requirements.

Currently this includes the language taken from the HTML lang property.