Re: CuteEditor methods are not working when making it visible by code.

  •  03-07-2013, 12:08 PM

    Re: CuteEditor methods are not working when making it visible by code.

    Hi,

     

    You do not need to fire the "CuteEditor_OnInitialized", it will fire automatically when the editor load. For now has no way to fire it in code, so you must wait for the page load. What I mean to hide the container when the editor load, is like the example below. I hide the div1 in the "CuteEditor_OnInitialized".

     

    1. <%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" %>  
    2.   
    3. <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    5. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head id="Head1" runat="server">  
    7.     <title></title>  
    8. </head>  
    9. <body>  
    10.     <form id="form1" runat="server">  
    11.         <div id="div1">  
    12.             <CE:Editor ID="editor1" runat="server" />  
    13.         </div>  
    14.     </form>  
    15. </body>  
    16. </html>  
    17.   
    18. <script>  
    19. function CuteEditor_OnInitialized(editor)  
    20. {  
    21.   //hide the container here  
    22.   var div1=document.getElementById("div1");  
    23.   div1.style.display="none";  
    24. }  
    25. </script>  
     

    Regards,

     

    Ken 

View Complete Thread