如何在CKEDITOR 4.0上使用resize事件?

Ram*_*esh 1 javascript ckeditor

我如何使用CKEDITOR 4.0 的resize 事件.

我需要在编辑器调整大小时设置一些属性.在CKEDITOR 4.0 API事件就在那里.但我不知道如何使用它.

在此输入图像描述

谁能告诉我如何使用它..

Ram*_*esh 5

解:

//After the editor instance created add the resize event
CKEDITOR.on('instanceCreated', function(ev) {
    ev.editor.on('resize',function(reEvent){
         alert( 'The editor resized' );
     });
 });
Run Code Online (Sandbox Code Playgroud)


小智 5

使用该instanceCreated事件对我不起作用,但instanceReady确实:

CKEDITOR.on('instanceReady',function(ev) {
    ev.editor.on('resize',function(reEvent){
        //your code here
    });
});
Run Code Online (Sandbox Code Playgroud)