ckeditor添加“keyup”事件

如何将“keyup”事件附加到CKEdtior(我使用的是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内容。 希望有人可以在这里帮忙。

谢谢

好吧,这似乎对我有用。

 $('#ckeditor textarea').ckeditor(function() { var editor = $('#ckeditor textarea').ckeditorGet(); editor.on('contentDom', function() { editor.document.on('keyup', function(event) { /* do stuff */ }); }, { skin : 'office2003' });