X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=_source%2Fplugins%2Fnewpage%2Fplugin.js;h=53fb48a4dfb7e5bbaf64c9975c897d04935ec8ac;hb=9afde8772159bd3436f1f5b7862960307710ae5a;hp=6dc20be7086923239f7f126e3eb314d76b815d7e;hpb=8761695d9b70afe75905deaac88f78c1f8aeb32d;p=ckeditor.git diff --git a/_source/plugins/newpage/plugin.js b/_source/plugins/newpage/plugin.js index 6dc20be..53fb48a 100644 --- a/_source/plugins/newpage/plugin.js +++ b/_source/plugins/newpage/plugin.js @@ -1,5 +1,5 @@ /* -Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -19,13 +19,18 @@ CKEDITOR.plugins.add( 'newpage', exec : function( editor ) { var command = this; - editor.setData( editor.config.newpage_html, function() + editor.setData( editor.config.newpage_html || '', function() { - editor.fire( 'afterCommandExec', + // Save the undo snapshot after all document changes are affected. (#4889) + setTimeout( function () { - name: command.name, - command: command - } ); + editor.fire( 'afterCommandExec', + { + name: command.name, + command: command + } ); + + }, 200 ); } ); editor.focus(); }, @@ -46,4 +51,3 @@ CKEDITOR.plugins.add( 'newpage', * @example * config.newpage_html = '<p>Type your text here.</p>'; */ -CKEDITOR.config.newpage_html = '';