X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=_source%2Fplugins%2Fnewpage%2Fplugin.js;h=62c5405126bffe1c6eac66dc33a5b0601e22c4dc;hp=6dc20be7086923239f7f126e3eb314d76b815d7e;hb=941b0a9ba4e673e292510d80a5a86806994b8ea6;hpb=7cd80714081a8ffdf4a1a8d2c72f120ed5ef3d6d diff --git a/_source/plugins/newpage/plugin.js b/_source/plugins/newpage/plugin.js index 6dc20be..62c5405 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 */ @@ -21,11 +21,16 @@ CKEDITOR.plugins.add( 'newpage', var command = this; 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(); },