TinyMCE 编辑器模式 API。

摘要

属性

名称类型摘要定义者

editorReadOnly

Boolean

标记在此模式激活时编辑器是否应设为只读。

EditorMode

方法

名称摘要定义者

activate()

激活此模式的处理函数,在停用之前模式之前调用。

EditorMode

deactivate()

停用此模式的处理函数,在激活新模式之后调用。

EditorMode

get()

返回当前激活的编辑器模式,例如 "design" 或 "readonly"。

EditorMode

isReadOnly()

检查编辑器是否处于只读状态。

EditorMode

register()

注册新的编辑器模式。

EditorMode

set()

设置编辑器模式。可用模式为 "design" 和 "readonly"。可通过 'register' 注册额外的模式。

EditorMode

方法

activate()

activate()

激活此模式的处理函数,在停用之前模式之前调用。


deactivate()

deactivate()

停用此模式的处理函数,在激活新模式之后调用。


get()

get(): String

返回当前激活的编辑器模式,例如 "design" 或 "readonly"。

返回值

  • String - 当前激活的编辑器模式。


isReadOnly()

isReadOnly(): Boolean

检查编辑器是否处于只读状态。

返回值

  • Boolean - 如果编辑器处于只读状态则为 true。


register()

register(api: EditorModeApi)

注册新的编辑器模式。

参数

  • api (EditorModeApi) - 新模式的激活和停用 API。


set()

set(mode: String)

设置编辑器模式。可用模式为 "design" 和 "readonly"。可通过 'register' 注册额外的模式。

参数

  • mode (String) - 要设置的编辑器模式。