Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5014)
+++ /CKEditor/trunk/CHANGES.html	(revision 5015)
@@ -77,4 +77,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/4951">#4951</a> : Replacing patterns into empty string throws errors.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/4963">#4963</a> : Link dialog doesn't open properly for e-mail type links.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/4999">#4999</a> : Adding undo snapshot for editor::setData.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.fckeditor.net/ticket/5006">#5006</a> : Dutch;</li>
Index: /CKEditor/trunk/_source/core/editor.js
===================================================================
--- /CKEditor/trunk/_source/core/editor.js	(revision 5014)
+++ /CKEditor/trunk/_source/core/editor.js	(revision 5015)
@@ -583,4 +583,5 @@
 		 * @param {String} data HTML code to replace the curent content in the editor.
 		 * @param {Function} callback Function to be called after the setData is completed.
+		 * @param {Boolean} noUndo Specify false to avoid editor from creating undo snapshot for this load.    
 		 * @example
 		 * CKEDITOR.instances.editor1.<b>setData( '&lt;p&gt;This is the editor data.&lt;/p&gt;' )</b>;
@@ -590,14 +591,14 @@
 		 * } );
 		 */
-		setData : function( data , callback )
-		{
-			if( callback )
-			{
-				this.on( 'dataReady', function( evt )
+		setData : function( data , callback, noUndo )
+		{
+			noUndo !== false && this.fire( 'saveSnapshot' );
+
+			this.on( 'dataReady', function( evt )
 				{
 					evt.removeListener();
-					callback.call( evt.editor );
-				} );
-			}
+					callback && callback.call( evt.editor );
+					noUndo !== false && this.fire( 'saveSnapshot' );
+				});
 			// Fire "setData" so data manipulation may happen.
 			var eventData = { dataValue : data };
