Rad Editor, paragrapg style and external css

4 posts, 0 answers
  1. josephjijo
    josephjijo avatar
    24 posts
    Member since:
    Oct 2006

    Posted 07 Jul 2009 Link to this post

    I'm using rad controls 2009.1.311.35 & VS 2008.
    The bgcolor of my design is blue.
    So when I use editor its background color is also becomes blue.
    To avoid this I'm using a css.

    My editor is:
    <telerik:RadEditor id="RadEditor_Desc" OnClientLoad="OnClientLoad" runat="server"  Skin="Sunset" width="715px" height="800px"   >
                              
     <Paragraphs>
    <telerik:EditorParagraph Title="<p class='VerdanaFont10Line15'>Verdana Font10 Line15</p>" Tag="<p class='VerdanaFont10Line15'>" />
    </Paragraphs>
    <Content>
    </Content>
    </telerik:RadEditor>

    To avoid the bgcolor blue i'm using the css:
    <CssFiles>
    <telerik:EditorCssFile Value="~/css/EditorContentArea.css" />
    </CssFiles>

    css file is:
     body
    {
      background-color: White !important;
      color: Black !important;
    }   

    OnClientLoad is used to add custom colors.

    The editor is in the content page.

    When if i call the the external css to clear the bgcolor, the paragraph styles are not working.
    I i avoid that file the paragrapg style wil work fine, but the bgcoolor is blue itself.
    Plz help.

                                     
  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 09 Jul 2009 Link to this post

    Hi,

    Yes, this is by design. When the CssFiles property is set the editor stops to pick up the styles from the page where it resides.

    In your scenario you should manually add the .VerdanaFont10Line15 class to the ~/css/EditorContentArea.css file and the class will be applied to the content area through the CssFiles property.

    The other approach is to set the content area appearance via the ContentAreaCssFile="~/css/EditorContentArea.css"  property. Therefore the editor will continue to apply the styles from the page to its content area.

    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. josephjijo
    josephjijo avatar
    24 posts
    Member since:
    Oct 2006

    Posted 09 Jul 2009 Link to this post

    It works fine.
    But a problem still exists.
    When a formatted block of text is applied with the above paragraph style, I get an error,

    Web page error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    Timestamp: Fri, 10 Jul 2009 03:57:39 UTC


    Message: 'this.get_document().body' is null or not an object
    Line: 8755
    Char: 1
    Code: 0
  5. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 10 Jul 2009 Link to this post

    Hi,

    I am aware of this problem and it appears when the whole content is selected in IE.

    To fix it you should upgrade to Q1 2009 SP2 (version 2009.1.527) or Q2 2009 (version 2009.2.701)  builds of RadControls for ASP.NET AJAX, where the problem does not exist.

    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top