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

Editor background problem

7 Answers 159 Views
Editor
This is a migrated thread and some comments may be shown as answers.
arijit
Top achievements
Rank 1
arijit asked on 04 Jul 2008, 04:49 AM
I am using Rad Editor - 7.1.1.0, skin = Office2007
I can not set the background color of the editor, It always takes the default color of the body style. How can I set that ? please help me, it is urjent.

7 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 04 Jul 2008, 07:39 AM
Hello arijit,

Actually the default background color of the RadEditor's content area is white. When you use a global style for setting the page's body background, however, you override the editor's background and it looks like its background is transparent.

You can override the background of the body global style in your page with the following code:

 <script type="text/javascript">  
  function OnClientLoad(editor, args)  
  {  
    editor.get_document().body.style.backgroundColor = "white";  
  }  
  </script> 
    <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
   
      <telerik:radeditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad" ToolsFile="~/ToolsFile.xml">  
   <Content> 
       Here is sample content!  
   </Content> 
     
</telerik:radeditor> 
 

 
or by setting the Value attribute of the telerik:EditorCssFile innerTag to an empty string or some external file:

    
  <telerik:radeditor runat="server" ID="RadEditor1" ToolsFile="~/ToolsFile.xml">  
   <Content> 
       Here is sample content!  
   </Content> 
   <CssFiles> 
        <telerik:EditorCssFile Value="" /> 
   </CssFiles> 
</telerik:radeditor> 
 

Another option is to set the background color as your page's body inline style - in this case it will not affect the RadEditor's content area:

<body style="background:red">   
 


I hope that this information is helpful.



All the best,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
arijit
Top achievements
Rank 1
answered on 04 Jul 2008, 09:06 AM

Thank you sir for the idea, actually the following script is working as it is a previous version


editor.GetContentArea().style.backgroundColor =
"white";

Again one more question , ToolsHeight and ToolsWidth is not working, and how to remove the footer items, I want a editor just like where i am writing now, what are the settings used ?
 Thanx in advance

0
Rumen
Telerik team
answered on 04 Jul 2008, 09:34 AM
Hi Arijit,

The ToolsWidth and ToolsHeight properties should work as expected. I made a test with the latest version and they worked properly. Of course, if the toolbar width is larger that the value set for the ToolsWidth property, the toolbar will be not displayed on two rows.

You can remove the editor's modules by firing the Clear method of the Modules collection of RadEditor:

        RadEditor1.Modules.Clear();

Sincerely yours,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
arijit
Top achievements
Rank 1
answered on 04 Jul 2008, 10:34 AM
Thanx for the supports

How can I set the width of the content at client side ?

editor.GetContentArea().style.width="800px";  is not working.


0
Rumen
Telerik team
answered on 04 Jul 2008, 12:23 PM
Hi Arijit,

My suggestion is to use the editor.SetSize(800, editor.GetHeight()) method of RadEditor. 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
arijit
Top achievements
Rank 1
answered on 04 Jul 2008, 12:36 PM

Thanx but this is not my answer.
I want to set the width of the Content Area, not the editor.
0
Rumen
Telerik team
answered on 04 Jul 2008, 01:39 PM
Thank you for the additional information.

You should set the width to the editor's IFRAME, e.g.

 <script type="text/javascript"> 
function OnClientLoad(editor) 

      var iframe = document.getElementById("RadEContentIframe" + editor.Id);
      iframe.style.width="800px"

</script>
<radE:RadEditor ID="RadEditor1" OnClientLoad="OnClientLoad" runat="server" ></radE:RadEditor> 


Greetings,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
arijit
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
arijit
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or