Changeset 6739


Ignore:
Timestamp:
04/20/11 20:57:47 (3 years ago)
Author:
wwalc
Message:

#7659 Plain textarea is shown when toggling CKEditor

Location:
CKEditor.NET/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CKEditor.NET/trunk/CHANGES.html

    r6738 r6739  
    7979                <li><a href="http://dev.ckeditor.com/ticket/7558">#7558</a> : Custom toolbar does not work.</li> 
    8080                <li><a href="http://dev.ckeditor.com/ticket/7660">#7660</a> : Problem with toggling the visible status.</li> 
     81                <li><a href="http://dev.ckeditor.com/ticket/7659">#7659</a> : Plain textarea is shown when toggling CKEditor.</li> 
    8182                <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> 
    8283                <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> 
  • CKEditor.NET/trunk/CKEditor.NET/CKEditorControl.cs

    r6738 r6739  
    10261026                        // http://msdn.microsoft.com/en-us/library/bb386417.aspx 
    10271027                        // Check _dev/msajax.js for an uncompressed version (available in CKEditor.Net downloaded from SVN). 
    1028                         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);})(); 
    1029 "; 
     1028                        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);})();"; 
    10301029                        this.RegisterStartupScript(this.GetType(), "CKEditorForNet", scriptInit, true); 
    10311030                        this.RegisterStartupScript(this.GetType(), this.ClientID + @"_addControl", string.Format(@"CKEditor_Controls.push('{0}'); 
  • CKEditor.NET/trunk/_dev/msajax.js

    r6689 r6739  
    99 
    1010function CKEditor_TextBoxEncode(cID, inUpdatePanel) { 
     11        var control; 
    1112        if (typeof CKEDITOR == 'undefined' || typeof CKEDITOR.instances[cID] == 'undefined') { 
    12                 var control = document.getElementById(cID); 
     13                control = document.getElementById(cID); 
    1314                if (control) 
    1415                        control.value = control.value.replace(/</g, '&lt;').replace(/>/g, '&gt;'); 
     
    1617        else { 
    1718                var e = CKEDITOR.instances[cID]; 
    18                 if (inUpdatePanel)  
     19                if (inUpdatePanel) { 
    1920                        e.destroy(); 
     21                        control = document.getElementById(cID); 
     22                        if (control) 
     23                                control.style.visibility = 'hidden'; 
     24                } 
    2025                else 
    2126                        e.updateElement(); 
     
    2530(function() 
    2631{ 
     32        if (typeof CKEDITOR != 'undefined') 
     33        { 
     34                var control = document.getElementById('{0}'); 
     35                if (control) 
     36                        control.style.visibility = 'hidden'; 
     37        } 
     38 
    2739        var onload = function() 
    2840        { 
Note: See TracChangeset for help on using the changeset viewer.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy