我已将ckeditor从4.4.6升级到4.9.2。升级后,观察到编辑器的'instanceDestroyed'事件未被触发。我的应用程序订阅了编辑器的不同事件,如'instanceCreated','instanceReady'和'instanceDestroyed'。除'instanceDestroyed'外,剩余事件将按预期触发。事件'instanceDestroyed'的代码如下所示:
CKEDITOR.on( 'instanceDestroyed', function(event) {
editorState[event.editor.name] = "DESTROYED" ;
});
有什么建议可以解决这个问题吗?
至于docs,它不应该触发CKEDITOR实例。您必须监听小部件存储库更改,如下所示:
CKEDITOR.widgets.on( 'instanceDestroyed', function(event) {
editorState[event.editor.name] = "DESTROYED" ;
});