← 全部文档

editor.isCommandEnabled(CommandID)

获取指定命令是否处于启用状态。

语法

editor.isCommandEnabled(CommandID)

参数

类型:string

命令名称。

返回值

类型:boolean

命令可用时返回 true,否则返回 false。

用法示例

var editor1 = new RichTextEditor("#div_editor1");      
editor1.clearHistory();      
console.log("after clear history, can undo : " + editor1.isCommandEnabled("undo"));