1

看到这个

是否可以为函数 execCommands 创建自定义命令(以及如何创建)?

我需要用于自定义标记的自定义命令。

4

1 回答 1

0

我不相信你可以覆盖 execCommand。您可以感知地进行条件检查,选择相应地运行 execCommand 还是自定义处理程序?

IE:

if(markup is custom){
    /* Execute custom command... */
} else {
    /* Execute custom handler... */
}

这可能只是在教祖母吸鸡蛋……

作为提示,您可能会通过更深入的示例获得更准确的答案,以说明您想要实现的目标。

于 2010-11-08T10:00:49.120 回答