This is a migrated thread and some comments may be shown as answers.

Rad Editor, paragrapg style and external css

3 Answers 88 Views
Editor
This is a migrated thread and some comments may be shown as answers.
josephjijo
Top achievements
Rank 1
josephjijo asked on 07 Jul 2009, 06:44 AM
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.

                                 

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 09 Jul 2009, 10:53 AM
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.
0
josephjijo
Top achievements
Rank 1
answered on 10 Jul 2009, 04:19 AM
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
0
Rumen
Telerik team
answered on 10 Jul 2009, 08:32 AM
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.
Tags
Editor
Asked by
josephjijo
Top achievements
Rank 1
Answers by
Rumen
Telerik team
josephjijo
Top achievements
Rank 1
Share this question
or