Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
看到这个。
是否可以为函数 execCommands 创建自定义命令(以及如何创建)?
我需要用于自定义标记的自定义命令。
我不相信你可以覆盖 execCommand。您可以感知地进行条件检查,选择相应地运行 execCommand 还是自定义处理程序?
IE:
if(markup is custom){ /* Execute custom command... */ } else { /* Execute custom handler... */ }
这可能只是在教祖母吸鸡蛋……
作为提示,您可能会通过更深入的示例获得更准确的答案,以说明您想要实现的目标。