Re: Upload / insert not working for editor created in code

  •  05-29-2013, 12:35 PM

    Re: Upload / insert not working for editor created in code

    Hi Bent Bracke,

     

    Please try the example below, does it work for you?

     

    1. <%@ Page Language="c#" ValidateRequest="false" %>  
    2.   
    3. <%@ Register TagPrefix="RTE" Namespace="RTE" Assembly="RichTextEditor" %>  
    4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    5. <html xmlns="http://www.w3.org/1999/xhtml">  
    6. <head>  
    7.     <title>example</title>  
    8. </head>  
    9.   
    10. <script runat="server">  
    11.     protected override void OnLoad(EventArgs e)  
    12.     {  
    13.         RTE.Editor ed = new RTE.Editor();  
    14.         ed.ID = "editor1";  
    15.         ed.Toolbar = "custom";  
    16.         placeholder.Controls.Add(ed);  
    17.         base.OnLoad(e);  
    18.     }  
    19. </script>  
    20.   
    21. <body>  
    22.     <form id="Form1" method="post" runat="server">  
    23.         <asp:Panel ID="placeholder" runat="server"></asp:Panel>  
    24.     </form>  
    25. </body>  
    26. </html>  
     

    Regards,

     

    Ken 

View Complete Thread