如何将“keyup”事件附加到 CKEditor(我正在使用 jQuery 适配器)
这是我当前使用的代码:
$('#ckeditor textarea').ckeditor(function(editorInstance) {
/* attaching "keyup" doesnt seem work so I have to stick with "key" */
$('#ckeditor textarea').ckeditorGet().on('key', function(e) {
/* do stuff ... */
});
}, {
skin : 'office2003'
});
整个想法是每次内容更改时获取ckeditor内容。
希望有人可以在这里提供帮助。
Thanks
好吧,这似乎对我有用。
$('#ckeditor textarea').ckeditor(function() {
var editor = $('#ckeditor textarea').ckeditorGet();
editor.on('contentDom', function() {
editor.document.on('keyup', function(event) {
/* do stuff */
});
}, {
skin : 'office2003'
});
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)