hi lonnie,
I think you are using the asp.net version of editor. So please try the example below.
By the way, the asp.net version forum is http://cutesoft.net/forums/23/ShowForum.aspx
- <%@ Page Language="C#" %>
-
- <%@ Register Namespace="CuteEditor" Assembly="CuteEditor" TagPrefix="CE" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head id="Head1" runat="server">
- <title>Untitled Page</title>
- </head>
-
- <script runat="server">
- protected override void OnLoad(EventArgs e)
- {
- editor1.Text = "this is a test";
- base.OnLoad(e);
- }
- </script>
-
- <body>
- <form id="form1" runat="server">
- <CE:Editor ID="editor1" runat="server">
- </CE:Editor>
- </form>
- </body>
- </html>
-
- <script type="text/javascript">
- function CuteEditor_OnInitialized(editor)
- {
- var editor1=document.getElementById("<%= editor1.ClientID %>");
- var editdoc = editor1.GetDocument();
- if(editdoc.body.addEventListener)
- {
- editdoc.addEventListener("focusin",clearContent,false);
- }
- else
- {
- editdoc.onfocusin=function()
- {
- editor1.SetHTML("");
- }
- }
- }
-
- function clearContent()
- {
- var editor1=document.getElementById("<%= editor1.ClientID %>");
- editor1.SetHTML("");
- }
-
-
- </script>
Regards,
Ken