Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html (revision 4836)
+++ /CKEditor/trunk/CHANGES.html (revision 4837)
@@ -76,4 +76,5 @@
#4904 : Fixed when paste happen from dialog, it always throw JavaScript error.
#4905 : Fixed paste plain text result incorrect when content from dialog.
+ #4889 : Fixed unable to undo 'New Page' command after typing inside editor.
Index: /CKEditor/trunk/_source/plugins/newpage/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/newpage/plugin.js (revision 4836)
+++ /CKEditor/trunk/_source/plugins/newpage/plugin.js (revision 4837)
@@ -22,9 +22,14 @@
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();