Re: Styles from CSS sheet

  •  05-01-2013, 12:12 PM

    Re: Styles from CSS sheet

    Hi,

     

    If you want to use another xml file, please open"\richtexteditor\dialogs\setstyles.xml", find section below. You can change the location and file name "staticstyles.xml" directly.

     

    var arr=[editor._config.folder+"config/staticstyles.xml?"+editor._config._urlsuffix];
     

    Also, the example below shows you how to custom the style dropdown list.

     

    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.         Editor1.ContentCssText = ".CustomStyle1{color:red}.CustomStyle2{color:blue}";  
    14.         base.OnLoad(e);  
    15.     }  
    16. </script>  
    17.   
    18. <body>  
    19.     <form id="Form1" method="post" runat="server">  
    20.         <RTE:Editor runat="server" ID="Editor1" Height="260px" />  
    21.     </form>  
    22. </body>  
    23. </html>  
     

    Regards,

     

    Ken 

View Complete Thread