ckeditor 4.9.2 instanceDestroyed事件未被触发

问题描述 投票:0回答:1

我已将ckeditor从4.4.6升级到4.9.2。升级后,观察到编辑器的'instanceDestroyed'事件未被触发。我的应用程序订阅了编辑器的不同事件,如'instanceCreated','instanceReady'和'instanceDestroyed'。除'instanceDestroyed'外,剩余事件将按预期触发。事件'instanceDestroyed'的代码如下所示:

CKEDITOR.on( 'instanceDestroyed', function(event) {
    editorState[event.editor.name] = "DESTROYED" ;      
});

有什么建议可以解决这个问题吗?

javascript ckeditor4.x
1个回答
0
投票

至于docs,它不应该触发CKEDITOR实例。您必须监听小部件存储库更改,如下所示:

CKEDITOR.widgets.on( 'instanceDestroyed', function(event) {
   editorState[event.editor.name] = "DESTROYED" ;      
});
© www.soinside.com 2019 - 2024. All rights reserved.