tinymce.EditorMode
TinyMCE 5 Mode API.
Properties
name | type | summary | defined by |
---|---|---|---|
editorReadOnly | boolean | Flags whether the editor should be made readonly while this mode is active. | tinymce.EditorMode |
Methods
name | summary | defined by |
---|---|---|
activate() | Handler to activate this mode, called before deactivating the previous mode. | tinymce.EditorMode |
deactivate() | Handler to deactivate this mode, called after activating the new mode. | tinymce.EditorMode |
get() | Returns the active editor mode, such as "design" or "readonly". | tinymce.EditorMode |
isReadOnly() | Checks if the editor is in a readonly state. | tinymce.EditorMode |
register() | Registers a new editor mode. | tinymce.EditorMode |
set() | Sets the editor mode. The available modes are "design" and "readonly". Additional modes can be registered using 'register'. | tinymce.EditorMode |
Methods
activate
activate()
Handler to activate this mode, called before deactivating the previous mode.
deactivate
deactivate()
Handler to deactivate this mode, called after activating the new mode.
get
get():String
Returns the active editor mode, such as "design" or "readonly".
Return value
- String - The active editor mode.
isReadOnly
isReadOnly():Boolean
Checks if the editor is in a readonly state.
Return value
- Boolean - true if the editor is in a readonly state.
register
register(api:EditorModeApi)
Registers a new editor mode.
Parameters
- api (EditorModeApi) - Activation and Deactivation API for the new mode.
set
set(mode:String)
Sets the editor mode. The available modes are "design" and "readonly". Additional modes can be registered using 'register'.
Parameters
- mode (String) - Mode to set the editor in.
Can't find what you're looking for? Let us know.
Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.