Re: getHTML() doesn't work when Cute Editor is in a hidden div

  •  08-19-2009, 3:45 AM

    Re: getHTML() doesn't work when Cute Editor is in a hidden div

    HI BruceWMorgan,
     
    Before you use API getHTML() and SetHTML() you need to make sure Editor instance exists.
     
    Please add the code below in your page and try again.
    1. <script runat="server">   
    2.     
    3.     public string loaderName;   
    4.   
    5.     protected override void OnInit(EventArgs e)   
    6.     {   
    7.         base.OnInit(e);   
    8.         System.Web.HttpBrowserCapabilities browser = Request.Browser;   
    9.         string browserName = browser.Browser;   
    10.   
    11.         switch (browserName)   
    12.         {   
    13.             case "IE":   
    14.                 loaderName = "IE_Loader";   
    15.                 break;   
    16.             case "Firefox":   
    17.                 loaderName = "Gecko_Loader";   
    18.                 break;   
    19.             case "AppleMAC-Safari":   
    20.                 loaderName = "Safari_Loader";   
    21.                 break;   
    22.             case "Opera":   
    23.                 loaderName = "Opera_Loader";   
    24.                 break;   
    25.             default:   
    26.                 break;   
    27.         }   
    28.   
    29.     }   
    30.        
    31. </script>   
    32.   
    33. <script src="CuteSoft_Client/CuteEditor/Scripts/spell.js"></script>   
    34.   
    35. <script src="CuteSoft_Client/CuteEditor/Scripts/<%=loaderName %>/Loader.js"></script>  

    Regards,
     
    Ken
View Complete Thread