Index: /CKEditor/branches/features/readonly/_source/plugins/editingblock/plugin.js
===================================================================
--- /CKEditor/branches/features/readonly/_source/plugins/editingblock/plugin.js	(revision 6764)
+++ /CKEditor/branches/features/readonly/_source/plugins/editingblock/plugin.js	(revision 6765)
@@ -11,9 +11,4 @@
 (function()
 {
-	var getMode = function( editor, mode )
-	{
-		return editor._.modes && editor._.modes[ mode || editor.mode ];
-	};
-
 	// This is a semaphore used to avoid recursive calls between
 	// the following data handling functions.
@@ -50,5 +45,5 @@
 						{
 							isHandlingData = true;
-							getMode( editor ).loadData( editor.getData() );
+							editor.getMode().loadData( editor.getData() );
 							isHandlingData = false;
 						}
@@ -75,5 +70,5 @@
 					{
 						isHandlingData = true;
-						editor.setData( getMode( editor ).getData(), null, 1 );
+						editor.setData( editor.getMode().getData(), null, 1 );
 						isHandlingData = false;
 					}
@@ -83,5 +78,5 @@
 				{
 					if ( editor.mode )
-						event.data = getMode( editor ).getSnapshotData();
+						event.data = editor.getMode().getSnapshotData();
 				});
 
@@ -89,5 +84,5 @@
 				{
 					if ( editor.mode )
-						getMode( editor ).loadSnapshotData( event.data );
+						editor.getMode().loadSnapshotData( event.data );
 				});
 
@@ -150,6 +145,5 @@
 	/**
 	 * Sets the current editing mode in this editor instance.
-	 * @param {String} [mode] A registered mode name. If not defined, the
-	 * 		current mode is simply unloaded.
+	 * @param {String} mode A registered mode name.
 	 * @example
 	 * // Switch to "source" view.
@@ -172,5 +166,5 @@
 			this.fire( 'beforeModeUnload' );
 
-			var currentMode = getMode( this );
+			var currentMode = this.getMode();
 			data = currentMode.getData();
 			currentMode.unload( holderElement );
@@ -180,13 +174,6 @@
 		holderElement.setHtml( '' );
 
-		if ( !mode )
-		{
-			this.setData( data );
-			this.fire( 'mode' );
-			return;
-		}
-
 		// Load required mode.
-		var modeEditor = getMode( this, mode );
+		var modeEditor = this.getMode( mode );
 		if ( !modeEditor )
 			throw '[CKEDITOR.editor.setMode] Unknown mode "' + mode + '".';
@@ -205,4 +192,15 @@
 
 	/**
+	 * Gets the current or any of the objects that represent the editing
+	 * area modes. The two most common editing modes are "wysiwyg" and "source".
+	 * @param {String} [mode] The mode to be retrieved. If not specified, the
+	 *		current one is returned.
+	 */
+	CKEDITOR.editor.prototype.getMode = function( mode )
+	{
+		return this._.modes && this._.modes[ mode || this.mode ];
+	};
+
+	/**
 	 * Moves the selection focus to the editing are space in the editor.
 	 */
@@ -210,5 +208,5 @@
 	{
 		this.forceNextSelectionCheck();
-		var mode = getMode( this );
+		var mode = this.getMode();
 		if ( mode )
 			mode.focus();
Index: /CKEditor/branches/features/readonly/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/branches/features/readonly/_source/plugins/wysiwygarea/plugin.js	(revision 6764)
+++ /CKEditor/branches/features/readonly/_source/plugins/wysiwygarea/plugin.js	(revision 6765)
@@ -1145,7 +1145,7 @@
 					if ( editor.mode == 'wysiwyg' )
 					{
-						// Simply reload the wysiwyg area.
-						editor.setMode();
-						editor.setMode( 'wysiwyg' );
+						// Symply reload the wysiwyg area. It'll take care of read-only.
+						var wysiwyg = editor.getMode();
+						wysiwyg.loadData( wysiwyg.getData() );
 					}
 				});
