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

Editor : Background color & Body

4 Answers 271 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Suzi
Top achievements
Rank 1
Suzi asked on 15 Jul 2008, 09:15 AM
I have a problem, the color of my page is black : body{ background-color:Black; }

I use RadEditor. The background color of the editor is black. I don't see the text that I am writing. How may to change the background color of the radEditor (White color) without changing the background color of the body ?

Thanks in advance,

Suzanne.

4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 15 Jul 2008, 09:37 AM
Hi Suzi,

To fix the problem and tell the editor to not pick up the styles from the page just set the CssFiles property to point to an external css file.

<telerik:radeditor runat="server" ID="RadEditor1">
   <CssFiles>
       <telerik:EditorCssFile Value="~/ExternalCssFiles/Styles1.css" />
   </CssFiles>
</telerik:radeditor>
 
You can leave the Styles1.css file empty or specify the desired content area appearance by defining global css classes for the different HTML elements, e.g. body, table, td, th, div, span, etc.


You can find more information here.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Suzi
Top achievements
Rank 1
answered on 17 Jul 2008, 07:15 AM
Ok thank you for you help. 

I try to add an editor cssfile, but it doesn't work. The background color stay in black. It should be White.

I have a style.css into my Theme directory with body{ background-color:Black; }. The global background color of my website is Black.

And an other css file which contains the style of the Editor Content.
<CssFiles>
<telerik:EditorCssFile Value="../App_Themes/EditorStyles.css" />
</CssFiles> 

When I see the source code of the page, The iframe of the RadEditor load
the EditorStyles.css first (white),
and to finish, style.css (black).

I don't know how to inverse the css loading. The background of the iframe stay Back, and not White.
0
Accepted
Sophy
Telerik team
answered on 17 Jul 2008, 09:00 AM
Hi Suzi,

I prepared an example following the settings you have described but I was not able to reproduce the issue. For your convenience I have attached my test sample and a screenshot demonstrating what is the result when running the page on my side. Please, review them and let me know whether there is something different in your project's settings. In case the provided example cannot help you solve the problem, please, send us your code so the we can take a closer look at your settings.
I suggest you also take a look at the RadEditor's Using Themes help article.

Greetings,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Suzi
Top achievements
Rank 1
answered on 17 Jul 2008, 03:48 PM
Thank you for your help.

Your project works very well on my computer. The background color of the radeditor content is White.

I am doing the same thing into my existing project, but It doesn't work. I found a solution :

 protected void Page_Load(object sender, EventArgs e)
 {
       if (!this.IsPostBack)
       {
            RadEditor1.CssFiles.Clear();
            RadEditor1.CssFiles.Add(string.Format("../App_Themes/styleseditorcontent.css"+this.Page.Theme));


Strangely, it is working very well with this code. Maybe, something is configured differently into my project ...

Thanks,


Tags
Editor
Asked by
Suzi
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Suzi
Top achievements
Rank 1
Sophy
Telerik team
Share this question
or