+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / RadEditor cssFiles property issue

RadEditor cssFiles property issue

5 posts, 0 answered
  1. Chuck
    Chuck avatar
    5 posts
    Registered:
    05 May 2008
    15 Apr 2010
    Link to this post
    Hello

    I'm having problem to set an external CSS file to the RadEditor Cssfiles property to load it for the "Apply Style" dropdown list. Basically the RadEditor "Apply Style" dropdown list shows with all the CSS styles defined in the Webpage not the one I set up with the CssFiles property. I'm using telerik Web UI version 2008.03.1314.35.
    Is the problem caused by the version of telerik I am using or just the setting is incorrect?

    Thanks
    Chuck


    Here Is the sample of the RadEditor setup in the Aspx page.
     

     

    <telerik:RadEditor ID="rtbLegend" Runat="server" Skin="Outlook" Width="380" Height="100" OnClientLoad="OnClientLoad" OnClientSelectionChange ="OnClientTableChanged" EditModes="Design" ToolsFile="~/Toolbar/Graphic/MaintenanceRichTextToolbar.xml" CssFiles="~/styles/UTD_gx_gen.css" />

     

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Apr 2010
    Link to this post
    Hi Chuck,

    You could try using one of the ways below

    • In the RadEditor declaration

    <CssFiles>
        <telerik:EditorCssFile Value="~/Files/StyleSheet.css"/>
    </CssFiles>

    • programmatically

    protected void Page_Load(object sender, EventArgs e)
    {
        Editor.CssFiles.Add("~/Files/StyleSheet.css");
    }

    • Using RadEditor's Tools XML file

    <cssFiles>    
       <item name="~/Files/SytelSheet.css" />    
    </cssFiles>


    All the best,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Chuck
    Chuck avatar
    5 posts
    Registered:
    05 May 2008
    15 Apr 2010
    Link to this post
    Ivan

    Thanks for the quick response. I choose the Tools XML file option, and it works.

    Best Regards
    Chuck
  4. Eric Wallace
    Eric Wallace avatar
    66 posts
    Registered:
    08 Oct 2009
    27 May 2010
    Link to this post
    I'm having an issue with the cssfiles property in the editortoolsfile.xml. None of the files I specify are not being included.

    Browser is Firefox 3.6.3

    EditorToolsFile.xml:
    .....
    <paragraphs>
        <paragraph name="&lt;h2 class='decorative'&gt;&lt;span&gt;Decorative Heading&lt;/span&gt;&lt;/h2&gt;" value="&lt;h2 class='decorative'&gt;"  />
        <paragraph name="Clear formatting" value="&lt;body>" />
        <paragraph name="&lt;H1>Heading 1&lt;/H1>" value="&lt;H1>" />
        <paragraph name="&lt;H2>Heading 2&lt;/H2>" value="&lt;H2>" />
        <paragraph name="&lt;H3>Heading 3&lt;/H3>" value="&lt;H3>" />
      </paragraphs>  
      <cssFiles>
        <item name="~/App_Themes/Default/Default.css" />
      </cssFiles>
      <classes>
        <class name="Add CssClasses collection here:" value=".attention" />
        <class name="EditorToolsFile.xml" value=".read" />
        <class name="Decorative" value=".decorative" />
      </classes>


    Thanks,
    Eric
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    28 May 2010
    Link to this post
    Hello Eric Wallace,

    I am not able to reproduce this issue when I am using cssFiles from the Tools xml. Most probably there is some cache. Please take a look at the attached video.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
5 posts, 0 answered