Index: /CKEditor/trunk/_source/plugins/undo/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/undo/plugin.js	(revision 3660)
+++ /CKEditor/trunk/_source/plugins/undo/plugin.js	(revision 3661)
@@ -108,4 +108,13 @@
 					command : 'redo'
 				});
+				
+			editor.resetUndo = function()
+			{
+				// Reset the undo stack.
+				undoManager.reset();
+
+				// Create the first image.
+				editor.fire( 'saveSnapshot' );
+			}
 		}
 	});
@@ -167,26 +176,8 @@
 	function UndoManager( editor )
 	{
-		this.typesCount = 0;
-		this.modifiersCount = 0;
-
 		this.editor = editor;
 
-		/**
-		 * Stack for all the undo and redo snapshots, they're always created/removed
-		 * in consistency.
-		 */
-		this.snapshots = [];
-
-		/**
-		 * Current snapshot history index.
-		 */
-		this.index = -1;
-
-		this.limit = editor.config.undoStackSize;
-
-		/**
-		 * Remember last pressed key.
-		 */
-		this.lastKeystroke = 0;
+		// Reset the undo stack.
+		this.reset();
 	}
 
@@ -289,4 +280,32 @@
 		},
 
+		reset : function()	// Reset the undo stack.
+		{
+			/**
+			 * Remember last pressed key.
+			 */
+			this.lastKeystroke = 0;
+
+			/**
+			 * Stack for all the undo and redo snapshots, they're always created/removed
+			 * in consistency.
+			 */
+			this.snapshots = [];
+
+			/**
+			 * Current snapshot history index.
+			 */
+			this.index = -1;
+
+			this.limit = this.editor.config.undoStackSize;
+
+			this.currentImage = null;
+
+			this.hasUndo = false;
+			this.hasRedo = false;
+
+			this.resetType();
+		},
+
 		/**
 		 * Reset all states about typing.
