TinyMCE Editor Manager.
- Source:
- Copyright:
- 2022 Andrew Lyons
- 2022 Andrew Lyons
- License:
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Members
(static, constant) configureDefaultEditor
Set the default editor configuration.
This configuration is used when an editor is initialised without any configuration.
(static, constant) getAllInstances
Get a list of all Editors in a Map, keyed by the DOM Node that the Editor is associated with.
(static, constant) getInstanceForElementId
Get the TinyMCE instance for the specified Node ID.
(static, constant) setupForElementId
Set up TinyMCE for the selector at the specified HTML Node id.
(static, constant) setupForTarget
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)
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}
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
|
Returns:
The TinyMCE Configuration
- Type
- object
(inner) getPlugins(options) → {object}
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
|
Returns:
- Type
- object
(inner) getStandardConfig(target, tinyMCE, options, plugins) → {object}
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()
Initialise the page with standard TinyMCE requirements.
Currently this includes the language taken from the HTML lang property.