Re: Cuteeditor textbox and jquery

  •  05-03-2016, 1:42 PM

    Re: Cuteeditor textbox and jquery

    hi,

     

    please refer to the document again, you need to get the editor instance first and use that api. you can try the example page below.

     

    1. <%@ Page Language="C#" ValidateRequest="false" %>  
    2.   
    3. <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>  
    4. <html>  
    5. <head>  
    6.     <title>example </title>  
    7. </head>  
    8. <body>  
    9.     <form id="Form1" runat="server">  
    10.         <CE:Editor ID="Editor1" runat="server">  
    11.         </CE:Editor>  
    12.         <input type="button" value="get editor content" onclick="GetContent()" />  
    13.          <input type="button" value="set content" onclick="SetContent()" />  
    14.     </form>  
    15. </body>  
    16. </html>  
    17. <script type="text/javascript">  
    18. function GetContent()  
    19. {  
    20.     var editor1 = document.getElementById('<%= Editor1.ClientID%>');  
    21.     alert(editor1.getHTML());  
    22. }  
    23. function SetContent()  
    24. {  
    25.      var editor1 = document.getElementById('<%= Editor1.ClientID%>');  
    26.      editor1.SetHTML("this is a test");  
    27. }  
    28. </script>  
     

    Regards,

     

    Ken 

View Complete Thread