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

RadEditor CSS Problem

1 Answer 138 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Ketan Patel
Top achievements
Rank 1
Ketan Patel asked on 11 Jul 2010, 07:55 PM
Hello sir,

I am using Radeditor. But it's causing CSS related issue.

can u guide me what i have to do it proper.

In area of radeditor background color of my Website comes.

My web site background color is blue and same color display in area of rad editor

can u help me on his matter ?

can u guide me which setting i m missing. i have only copy dll in my bin folder.

i have attached two screen short please look it.

Thank you.
    

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 12 Jul 2010, 04:03 PM
Hello Ketan,

As I could see from your project, you have set blue background color to the BODY element.

By default, RadEditor copies the styles from the parent page in which it resides in order to display its content identically to the content on the parent page. In some scenarios this is not convenient for the end-user because the editor's background and text colors can appear unreadable.

The solution is setting the CssFiles property to point to an external css file and manually specify the classes that you want to load in the editor. By setting the CssFiles property you will prevent the editor to pick up the styles from the parent page, e.g.

Please, find a simple code, showing a page with a blue background color, and RadEdiotr with settings similar to yours, where the background color is fixed and is not inherited by the body element.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <style type="text/css">
        body
        {
            background: blue;
        }
    </style>
</head>
<body class="blue">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <telerik:RadEditor ID="RE1" runat="server" Skin="WebBlue" Height="500" Width="100%"
        ToolTip="File Editor">
        <CssFiles>
            <telerik:EditorCssFile Value="empty.css" />
        </CssFiles>
    </telerik:RadEditor>
    </form>
</body>
</html>

More detailed explanation you could find at our Help center: Content Area Appearance Problems

Best wishes,
Bojo
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
Tags
Editor
Asked by
Ketan Patel
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or