X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fnewpage%2Fplugin.js;h=6dc20be7086923239f7f126e3eb314d76b815d7e;hp=2c76877c074edb25734a6191aff367d070e6d298;hb=8761695d9b70afe75905deaac88f78c1f8aeb32d;hpb=ea7e3453c7b0f023b050aca6d9f83ab372860d91 diff --git a/_source/plugins/newpage/plugin.js b/_source/plugins/newpage/plugin.js index 2c76877..6dc20be 100644 --- a/_source/plugins/newpage/plugin.js +++ b/_source/plugins/newpage/plugin.js @@ -19,31 +19,15 @@ CKEDITOR.plugins.add( 'newpage', exec : function( editor ) { var command = this; - function afterCommand() + editor.setData( editor.config.newpage_html, function() { - // Defer to happen after 'selectionChange'. - setTimeout( function() + editor.fire( 'afterCommandExec', { - editor.fire( 'afterCommandExec', - { - name: command.name, - command: command - } ); - }, 500 ); - } - if ( editor.mode == 'wysiwyg') - editor.on( 'contentDom', function( evt ){ - - evt.removeListener(); - afterCommand(); + name: command.name, + command: command } ); - - editor.setData( editor.config.newpage_html ); + } ); editor.focus(); - - if( editor.mode == 'source' ) - afterCommand(); - }, async : true });