Re: Client-side script to disable the Editor?

  •  04-18-2010, 10:30 PM

    Re: Client-side script to disable the Editor?

    rschaeferhig:
    Adam,
     
    I don't see how that example applies. We've already got the Editor on the page and configured the toolbars with our own buttons, etc. I need to know if there is a way to disable the Editor control in Javascript on the client side. Removing the toolbars or not is a secondary requirement. 
     
    There is a textbox on the page that, if used, we would want to disable the Editor. It's an either/or and we need to disable the Editor in real-time, not on a postback.
     
    Thanks.
     
    Hi rschaeferhig,
     
    For now, editor does not support this function.
     
    Maybe you can try hide editor. example
     
    1. <%@ Page Language="C#" %>   
    2.   
    3. <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>   
    4. <html>   
    5. <head>   
    6. </head>   
    7. <body>   
    8.     <form id="Form1" runat="server">   
    9.         <CE:Editor ID="editor1" runat="server">   
    10.         </CE:Editor>   
    11.         <input type="button" value="Hide" onclick="hide()" />   
    12.     </form>   
    13. </body>   
    14. </html>   
    15.   
    16. <script>   
    17. var editor1 = document.getElementById('<%= editor1.ClientID%>');   
    18. function hide()   
    19. {   
    20. editor1.style.visibility="hidden";   
    21.   
    22. }   
    23. </script>  
    Regards,
     
    Ken
View Complete Thread