How can I stop RAD Editor from applying stylesheets to the content pane?

2 posts, 0 answers
  1. Andrew Benz
    Andrew Benz avatar
    1 posts
    Member since:
    Nov 2006

    Posted 15 Apr 2011 Link to this post

    I want to use a stylesheet on a page that contains a RAD Editor control.  I do *not* want RAD Editor to take that stylesheet link and add it to the content iframe.  Seems like it should be simple to do, but nothing seems to work.  Here's my code:

    <telerik:RadEditor ID="edtMe" runat="server" Skin="WebBlue" Height="600px" Width="100%"
        ContentFilters="RemoveScripts, FixUlBoldItalic, FixEnclosingP, IECleanAnchors, MozEmStrong, ConvertToXhtml, IndentHTMLContent"
        StripFormattingOptions="MSWordRemoveAll" OnClientPasteHtml="OnClientPasteHtml" SpellCheckSettings-AllowAddCustom="false">
            <telerik:EditorCssFile Value="~/CSS/blank.css" />

    Using the CssFiles is the correct way to make this happen, right?  Not only are the page styles still being linked in the content iframe, but blank.css is *not* being included.  The content area iframe's head element looks like this:

        <link href="/MvApp/WebResource.axd?d=ZMA9Nyl6OV-krKpF_AxH2ehr5-QYUrzahQKPDXQJIRbD47XVXXyGnhGGRWxBtFdN4Rbj-vRYXe6815fiQCJqONv8yYpz-mHqbT_xLF5uFGZiBNGg4prjb2HEQSOTlJ3QqpKfVUx83-JpV7QlzOL4nw2&t=634203434222846081" type="text/css" id="RADEDITORSTYLESHEET0" rel="stylesheet">
        <link href="./CSS/Styles.css" type="text/css" id="RADEDITORSTYLESHEET1" rel="stylesheet">
        <link href="App_Themes/Basic/MainMaster.css" type="text/css" id="RADEDITORSTYLESHEET2" rel="stylesheet">
        <link href="App_Themes/Basic/Menu.css" type="text/css" id="RADEDITORSTYLESHEET3" rel="stylesheet">

    You'll notice that blank.css isn't there and Styles.css (the stylesheet I want on the page but not in the content), is.  Any thoughts?

    I'm using RAD controls v2010.1.519.35.
  2. Rumen
    Rumen avatar
    13804 posts

    Posted 19 Apr 2011 Link to this post

    Hi Andrew,

    Yes the correct way to implement your scenario is by setting the CssFiles property as discussed in this help article: Content Area Appearance Problems.

    Did you tried to clear your browser's cache?

    For your convenience I created and attached a sample working project and video demonstrating that the CssFiles property fixes the problem. Here is the video:

    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top