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

Background Color for RadEditor

3 Answers 206 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Rob Venable
Top achievements
Rank 1
Rob Venable asked on 03 Jun 2010, 12:28 AM
Hi,
I would like to change the background color of my RadEditor. I've seen all of the posts where they say to use the code below and put the classes in the newly created css file. I've tried this and it doesn't work...it still picks up the background color of the parent page. Does anyone know a workaround for this?

Thanks

<telerik:RadEditor ID="RadEditor1" Runat="server">
   
<CssFiles>
       
<telerik:EditorCssFile Value="~/EditorContentArea.css" />
   
</CssFiles>
</
telerik:RadEditor>

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Jun 2010, 07:18 AM
Hello Rob,

I followed the technique described in the documentation in order to change the background color of RadEditor control. And I got it working evenif I set background-color for the page.

Here is my 'EditorContentArea.css'
 
body   
{  
    colorwhite;  
    background-color: Silver;  
    padding:3px;  
    background-imagenone;  
    margin0px;  
    text-alignleft;  

Is the prooblem happening for any specific browser?


Regards,
Princy.
0
Rumen
Telerik team
answered on 03 Jun 2010, 08:15 AM
Hi Rob,

You can experience this problem if you have set the ToolsFile property in the codebehind.

 If you are to set external css files in dynamically loaded editors, make sure to load the Toolsfile before you add any external css files, e.g.

RadEditor1.ToolsFile = "~/RadEditorTools-Simple.xml";
RadEditor1.CssFiles.Add(new EditorCssFile("~/Css/RadEditor.css"));


This information is available in the following help article: External Css Files.


Greetings,
Rumen
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.
0
Rob Venable
Top achievements
Rank 1
answered on 03 Jun 2010, 11:02 PM
Hi Princy,
Still doesn't work. In IE or Firefox. It doesn't seem to be reading the stylesheet at all because it's not doing the text-align either.
This is what I've got:

<

 

div>

 

 

<telerik:RadEditor ID="radEmail" runat="server">

 

 

<CssClasses>

 

 

<telerik:EditorCssClass value="~/EditorContentArea.css" />

 

 

</CssClasses>

 

 

</telerik:RadEditor>

 

 

</div>

 


... I've used the styles you provided and I've put the stylesheet at the root of my website and it doesn't seem to be reading it. I thought it may be a path issue and I've tried it at a couple of different locations and it doesn't sem to find it.

Do I have to add a StylesheetManager or something?
Tags
Editor
Asked by
Rob Venable
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Rumen
Telerik team
Rob Venable
Top achievements
Rank 1
Share this question
or