Styles from CSS sheet

Last post 05-01-2013, 12:12 PM by Kenneth. 2 replies.
Sort Posts: Previous Next
  •  04-30-2013, 9:06 PM 77336

    Styles from CSS sheet

    Is there a way of listing the styles in the drop down box from an external CSS sheet.

     

     Daniel

  •  04-30-2013, 9:13 PM 77337 in reply to 77336

    Re: Styles from CSS sheet

    Or how do you change the set name of the xml file.

     

    Thanks,

    Daniel 

  •  05-01-2013, 12:12 PM 77338 in reply to 77337

    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 as RSS news feed in XML