tinymce.EditorMode

TinyMCE Editor Mode API.

Summary

Properties

Name Type Summary Defined by

editorReadOnly

Boolean

Flags whether the editor should be made readonly while this mode is active.

EditorMode

Methods

Name Summary Defined by

activate()

Handler to activate this mode, called before deactivating the previous mode.

EditorMode

deactivate()

Handler to deactivate this mode, called after activating the new mode.

EditorMode

get()

Returns the active editor mode, such as "design" or "readonly".

EditorMode

isReadOnly()

Checks if the editor is in a readonly state.

EditorMode

register()

Registers a new editor mode.

EditorMode

set()

Sets the editor mode. The available modes are "design" and "readonly". Additional modes can be registered using 'register'.

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.