How to disable the button outside of the cuteeditor when html view is enabledcuteeditor using javascript

Last post 12-02-2010, 5:41 AM by mianrizwanali. 5 replies.
Sort Posts: Previous Next
  •  11-29-2010, 6:38 AM 65189

    How to disable the button outside of the cuteeditor when html view is enabledcuteeditor using javascript

    Hi,
    I have a  button on the page along with cute editor, i want to disable that button when user clicks the HTML view of the editor, using javascript, how can i do this? any idea?
    Filed under: ,
  •  11-29-2010, 6:39 AM 65190 in reply to 65189

    Re: How to disable the button outside of the cuteeditor when html view is enabledcuteeditor using javascript

    any pre-defined function for this or should I need to make a function for this?
  •  11-29-2010, 8:25 AM 65191 in reply to 65190

    Re: How to disable the button outside of the cuteeditor when html view is enabledcuteeditor using javascript

    Dear mianrizwanali,
     
    Editor.CodeViewTemplateItemList Property:

    The toolbar items used in the editor Code View going to this string.

    Example:

    CodeViewTemplateItemList="Save,Print,Cut,Copy,Paste,Find,ToFullPage,FromFullPage,SelectAll
    Please note that only buttons are supported in the HTML view.
    If this is not what you need, please let me know.
     
    Thank you for asking

     

     
  •  11-30-2010, 6:38 AM 65205 in reply to 65191

    Re: How to disable the button outside of the cuteeditor when html view is enabledcuteeditor using javascript

    I want to know is there any java script function which i can call when user changes the mode from design to HTML VIEW and vise versa.
    so that i can change the visibility of a HTML button  which is outside the cute editor.
  •  12-02-2010, 12:51 AM 65226 in reply to 65205

    Re: How to disable the button outside of the cuteeditor when html view is enabledcuteeditor using javascript

    Hi mianrizwanali,
     
    Please try the example below
     
    1. <%@ Page Language="C#" %>  
    2.   
    3. <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    5.   
    6. <html xmlns="http://www.w3.org/1999/xhtml">  
    7. <head runat="server">  
    8.     <title>Untitled Page</title>  
    9. </head>  
    10. <body>  
    11.     <form id="form1" runat="server">  
    12.         <div>  
    13.             <CE:Editor ID="Editor1" runat="server" >  
    14.             </CE:Editor>  
    15.         </div>  
    16.     </form>  
    17. </body>  
    18. </html>  
    19.   
    20. <script>  
    21. function CuteEditor_OnCommand(editor,command,ui,value)  
    22.  {  
    23.  if(command=="TabCode")  
    24.  {  
    25.     //fire when switch to html view  
    26.     alert("HTMLView");  
    27.  }  
    28.  if(command=="TabEdit")  
    29.  {  
    30.      //fire when switch back to normal view  
    31.     alert("NormalView");   
    32.  }  
    33. }  
    34. </script> 
     
    Regards,
     
    Ken
  •  12-02-2010, 5:41 AM 65234 in reply to 65226

    Re: How to disable the button outside of the cuteeditor when html view is enabledcuteeditor using javascript

    Hi Ken!
    thanks for your help, I really appreciate your efforts about this help.
    Thanks, 
    regards, 
    Mian Rizwan Ali
View as RSS news feed in XML