请参阅此。
是否可以为 execCommands 函数创建自定义命令(以及如何创建)?
我需要用于自定义标记的自定义命令。
See this.
Is it possible to create custom commands (and how) for the function execCommands?
I need custom commands for custom markup.
我不相信你可以覆盖 execCommand。您是否可以做一个条件检查来选择相应地运行 execCommand 还是自定义处理程序?
即:
if(markup is custom){ /* Execute custom command... */ } else { /* Execute custom handler... */ }
这可能只是在教祖母吸鸡蛋......
作为提示,您可能会通过更深入的示例来获得您想要实现的目标的更准确的答案。
I do not believe that you can override execCommand. Could you perceivably do a conditional check which chooses whether to run execCommand or a custom handler accordingly?
ie:
This may just be teaching grandmothers to suck eggs...
As a tip, you may get more accurate answers with more in-depth examples of what you want to achieve.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
我不相信你可以覆盖 execCommand。您是否可以做一个条件检查来选择相应地运行 execCommand 还是自定义处理程序?
即:
这可能只是在教祖母吸鸡蛋......
作为提示,您可能会通过更深入的示例来获得您想要实现的目标的更准确的答案。
I do not believe that you can override execCommand. Could you perceivably do a conditional check which chooses whether to run execCommand or a custom handler accordingly?
ie:
This may just be teaching grandmothers to suck eggs...
As a tip, you may get more accurate answers with more in-depth examples of what you want to achieve.