Index: /CKEditor.NET/trunk/CHANGES.html
===================================================================
--- /CKEditor.NET/trunk/CHANGES.html	(revision 6738)
+++ /CKEditor.NET/trunk/CHANGES.html	(revision 6739)
@@ -79,4 +79,5 @@
 		<li><a href="http://dev.ckeditor.com/ticket/7558">#7558</a> : Custom toolbar does not work.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/7660">#7660</a> : Problem with toggling the visible status.</li>
+		<li><a href="http://dev.ckeditor.com/ticket/7659">#7659</a> : Plain textarea is shown when toggling CKEditor.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/7302">#7302</a> : It is impossible to customize the editor inside a master page and if attributes are placed in front of the control ID.</li>
 		<li><a href="http://dev.ckeditor.com/ticket/7590">#7590</a> : Error in Visual Studio when trying to reset values in the Properties window.</li>
Index: /CKEditor.NET/trunk/CKEditor.NET/CKEditorControl.cs
===================================================================
--- /CKEditor.NET/trunk/CKEditor.NET/CKEditorControl.cs	(revision 6738)
+++ /CKEditor.NET/trunk/CKEditor.NET/CKEditorControl.cs	(revision 6739)
@@ -1026,6 +1026,5 @@
 			// http://msdn.microsoft.com/en-us/library/bb386417.aspx
 			// Check _dev/msajax.js for an uncompressed version (available in CKEditor.Net downloaded from SVN).
-			scriptInit += @"var CKEditor_Controls=[],CKEditor_Init=[];function CKEditor_TextBoxEncode(d,e){if(typeof CKEDITOR=='undefined'||typeof CKEDITOR.instances[d]=='undefined'){var f=document.getElementById(d); if(f) f.value=f.value.replace(/</g,'&lt;').replace(/>/g,'&gt;');}else{var g=CKEDITOR.instances[d];if(e)g.destroy();else g.updateElement();}};(function(){var d=function(){var e=CKEditor_Controls,f=CKEditor_Init,g=window.pageLoad,h=function(){for(var i=e.length;i--;){var j=document.getElementById(e[i]);if(j&&j.value&&(j.value.indexOf('<')==-1||j.value.indexOf('>')==-1))j.value=j.value.replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');}if(typeof CKEDITOR!='undefined')for(var i=0;i<f.length;i++)f[i].call(this);};window.pageLoad=function(i,j){if(j.get_isPartialLoad())setTimeout(h,0);if(g&&typeof g=='function')g.call(this,i,j);};setTimeout(h,0);};if(window.addEventListener)window.addEventListener('load',d,false);else if(window.attachEvent)window.attachEvent('onload',d);})();
-";
+			scriptInit += @"var CKEditor_Controls=[],CKEditor_Init=[];function CKEditor_TextBoxEncode(d,e){var f;if(typeof CKEDITOR=='undefined'||typeof CKEDITOR.instances[d]=='undefined'){f=document.getElementById(d);if(f)f.value=f.value.replace(/</g,'&lt;').replace(/>/g,'&gt;');}else{var g=CKEDITOR.instances[d];if(e){g.destroy();f=document.getElementById(d);if(f)f.style.visibility='hidden';}else g.updateElement();}};(function(){if(typeof CKEDITOR!='undefined'){var d=document.getElementById('" + this.ClientID + @"');if(d)d.style.visibility='hidden';}var e=function(){var f=CKEditor_Controls,g=CKEditor_Init,h=window.pageLoad,i=function(){for(var j=f.length;j--;){var k=document.getElementById(f[j]);if(k&&k.value&&(k.value.indexOf('<')==-1||k.value.indexOf('>')==-1))k.value=k.value.replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');}if(typeof CKEDITOR!='undefined')for(var j=0;j<g.length;j++)g[j].call(this);};window.pageLoad=function(j,k){if(k.get_isPartialLoad())setTimeout(i,0);if(h&&typeof h=='function')h.call(this,j,k);};setTimeout(i,0);};if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();";
 			this.RegisterStartupScript(this.GetType(), "CKEditorForNet", scriptInit, true);
 			this.RegisterStartupScript(this.GetType(), this.ClientID + @"_addControl", string.Format(@"CKEditor_Controls.push('{0}');
Index: /CKEditor.NET/trunk/_dev/msajax.js
===================================================================
--- /CKEditor.NET/trunk/_dev/msajax.js	(revision 6738)
+++ /CKEditor.NET/trunk/_dev/msajax.js	(revision 6739)
@@ -9,6 +9,7 @@
 
 function CKEditor_TextBoxEncode(cID, inUpdatePanel) {
+	var control;
 	if (typeof CKEDITOR == 'undefined' || typeof CKEDITOR.instances[cID] == 'undefined') {
-		var control = document.getElementById(cID);
+		control = document.getElementById(cID);
 		if (control)
 			control.value = control.value.replace(/</g, '&lt;').replace(/>/g, '&gt;');
@@ -16,6 +17,10 @@
 	else {
 		var e = CKEDITOR.instances[cID];
-		if (inUpdatePanel) 
+		if (inUpdatePanel) {
 			e.destroy();
+			control = document.getElementById(cID);
+			if (control)
+				control.style.visibility = 'hidden';
+		}
 		else
 			e.updateElement();
@@ -25,4 +30,11 @@
 (function()
 {
+	if (typeof CKEDITOR != 'undefined')
+	{
+		var control = document.getElementById('{0}');
+		if (control)
+			control.style.visibility = 'hidden';
+	}
+
 	var onload = function()
 	{
