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.
- <%@ Page Language="C#" ValidateRequest="false" %>
-
- <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
- <html>
- <head>
- <title>example </title>
- </head>
- <body>
- <form id="Form1" runat="server">
- <CE:Editor ID="Editor1" runat="server">
- </CE:Editor>
- <input type="button" value="get editor content" onclick="GetContent()" />
- <input type="button" value="set content" onclick="SetContent()" />
- </form>
- </body>
- </html>
- <script type="text/javascript">
- function GetContent()
- {
- var editor1 = document.getElementById('<%= Editor1.ClientID%>');
- alert(editor1.getHTML());
- }
- function SetContent()
- {
- var editor1 = document.getElementById('<%= Editor1.ClientID%>');
- editor1.SetHTML("this is a test");
- }
- </script>
Regards,
Ken