code: function( newImage ) {
  			// Do not change snapshots stack is locked.
  			if ( this.locked )
  				return;
  
  			if ( !newImage )
  				newImage = new Image( this.editor );
  
  			var i = this.index,
  				snapshots = this.snapshots;
  
  			// Find all previous snapshots made for the same content (which differ
  			// only by selection) and replace all of them with the current image.
  			while ( i > 0 && this.currentImage.equalsContent( snapshots[ i - 1 ] ) )
  				i -= 1;
  
  			snapshots.splice( i, this.index - i + 1, newImage );
  			this.index = i;
  			this.currentImage = newImage;
  		}
docs: Updates the last snapshot of the undo stack with the current editor content.
  
  @param {CKEDITOR.plugins.undo.Image} [newImage] The image which will replace the current one.
  If it is not set, it defaults to the image taken from the editor.