5

I'm using the HtmlEditorExtender control of the AJAX Control Toolkit and I want to change the editor's background color to another color.

How can I do that?

Zoot
  • 2,217
  • 4
  • 29
  • 47
Maninder
  • 1,261
  • 5
  • 20
  • 34

4 Answers4

7

You just have to target the css class that the AJAXControlToolkit uses to style that element. In this case, it is the ajax__html_editor_extender_texteditor class. The following css would make the background of the HTML editor orange:

.ajax__html_editor_extender_texteditor
{
    background-color:#FFA500;
}
Josh Darnell
  • 11,304
  • 9
  • 38
  • 66
1

Put all inside this div. Works nicely!

div style="background-color: white; width: 100%;background-color:white;padding:0px 10px 6px 0px;"

user2648846
  • 375
  • 3
  • 3
1

If you put the control and extender into a table, you can set the background color in the tag like so:

<td style="background-color: white;">
        <asp:TextBox ID="myTextBox" MaxLength="1000" Width="250px" Height="250px" TextMode="MultiLine" Rows="10" Wrap="true" runat="server" />
        <ajaxToolkit:HtmlEditorExtender ID="HtmlEditorExtender1" TargetControlID="myTextBox" runat="server"/>
</td>
Josh Darnell
  • 11,304
  • 9
  • 38
  • 66
lcn
  • 11
  • 1
-1

You try to define a css and set it to the CssClass attribute of HtmlEditorExtender.

E.g

<style type="text/css">
.generalbox {
background-color:#F90
}
</style>


<cc2:Editor ID="txtDescription" CssClass="generalbox" runat="server"  Height="300px" AutoFocus="true" Width="100%" />
Terry chan
  • 106
  • 7
  • HtmlEditorExtender doesn't hv any CssClass property.Simple Html editor has this property ,i ve verified.I m using HtmlEditorExtender not HtmlEditor. – Maninder Dec 22 '11 at 09:36