Load a template on CuteEditor startup

Last post 06-17-2009, 12:41 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  06-16-2009, 8:33 PM 53190

    Load a template on CuteEditor startup

    Hi,
     
    I would like to know how to load a template as the CuteEditor loads on startup.
     
    I tried "TemplateUrl", but it only shows the template for a while then after CuteEditor fully loads it again disappears.
     
     
    Appreciate your help on this.
  •  06-17-2009, 12:41 AM 53197 in reply to 53190

    Re: Load a template on CuteEditor startup

    Hi CIC,
     
    Try properties LoadHtml, like below
     
    1. <%@ Page Language="C#" %>   
    2.   
    3. <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>   
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">   
    5.   
    6. <script runat="server">   
    7.     protected override void OnLoad(EventArgs e)   
    8.     {   
    9.         Editor1.LoadHtml("~/default.aspx");   
    10.         base.OnLoad(e);   
    11.     }   
    12. </script>   
    13.   
    14. <html xmlns="http://www.w3.org/1999/xhtml">   
    15. <head runat="server">   
    16.     <title>Untitled Page</title>   
    17. </head>   
    18. <body>   
    19.     <form id="form1" runat="server">   
    20.         <div>   
    21.             <CE:Editor ID="Editor1" runat="server">   
    22.             </CE:Editor>   
    23.         </div>   
    24.     </form>   
    25. </body>   
    26. </html>  

    Regards,
     
    ken
View as RSS news feed in XML