如何在更改事件上检测CKEditor源模式 [英] How to detect CKEditor source mode on change event
本文介绍了如何在更改事件上检测CKEditor源模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在CKEditor中,我知道在正常模式下,我们可以使用以下代码检测任何内容更改:
In CKEditor, I know that in the "normal mode", we can detect any content change using the following code:
ckeditor.on('change',function(e){
console.log("ckeditor on change");
});
但如果我切换到源模式,则事件不会触发。
But if I switch over to the source mode, the event does not fire.
如何检测源视图的on change事件?
How can I detect the on change event for source view?
推荐答案
而不是使用更改事件,关键事件会触发源视图。
Instead of using "change" event, the "key" event does fire on the source view.
感谢Kicker的提示
Thanks for Kicker's hint
这篇关于如何在更改事件上检测CKEditor源模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文