Re: Can programmatically/dynamically set a background image for editor?

  •  12-03-2008, 7:33 PM

    Re: Can programmatically/dynamically set a background image for editor?

    In the download package, there is a file named Using-External-Style-Sheets.aspx.
     
    Here is the source code of this example:
     

    <%@ Page Language="C#"%>
    <%@ Register TagPrefix="cutesoft" TagName="banner" Src="banner.ascx" %>
    <%@ Register TagPrefix="cutesoft" TagName="leftmenu" Src="leftmenu.ascx" %>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>

    <html>
        <head>
      <title>ASP and ASP.NET WYSIWYG Editor - Using External Style Sheets </title>
      <link rel="stylesheet" href="../example.css" type="text/css" />
     </head>
     <body>
            <form runat="server">
       <cutesoft:banner id="banner1" runat="server" /> 
       <table>
        <tr>     
         <td valign="top" nowrap id="leftcolumn" width="160">
          <cutesoft:leftmenu id="leftmenu1" runat="server" />    
         </td>
         <td width="20" nowrap></td>
         <td valign="top" width="750">
          <h1>Using External Style Sheets </h1>
          With Cute Editor, you can specify the location of the style sheet that will be used by the editable area. Multiple Style Sheets are supported.
          <br><br>
          <asp:radiobuttonlist id="themeList" runat="server" autopostback="True" RepeatDirection="Horizontal" onselectedindexchanged="theme_Changed">
           <asp:ListItem value="../example.css"  Selected="True">example.css</asp:ListItem>
           <asp:ListItem value="blackbackground.css">blackbackground.css</asp:ListItem>
           <asp:ListItem value="../example.css,blackbackground.css">example.css+blackbackground.css</asp:ListItem>
          </asp:radiobuttonlist>
          <CE:Editor ThemeType="Office2007" id="Editor1" runat="server" Height="250" AutoConfigure="Simple"></CE:Editor>
          <br><br>
          <asp:Literal ID="Literal1" Runat="server" /> 
         </td>
        <tr>
       </table>   
      </form>
     </body>
    </html>

    <script runat="server">
     private void theme_Changed(Object sender, EventArgs e)
     {
      Editor1.EditorWysiwygModeCss  = themeList.SelectedItem.Value; 
     }
    </script>


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View Complete Thread