Important changes to Tiny Cloud pricing > Find out more

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() tinymce.EditorMode
isReadOnly() tinymce.EditorMode
register() Registers a new editor mode. tinymce.EditorMode
set() Sets the editor mode. Mode can be for example "design", "code" or "readonly". 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

Return value
  • String - The active editor mode.

isReadOnly

isReadOnly():Boolean

Return value
  • Boolean - true if the editor is in a readonly state.

register

register(api:ModeApi)

Registers a new editor mode.

Parameters
  • api (ModeApi) - Activation and Deactivation API for the new mode.

set

set(mode:String)

Sets the editor mode. Mode can be for example "design", "code" or "readonly".

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.