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

RadEditor SPAN style

1 Answer 52 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 27 Sep 2010, 03:58 AM
Hello,

I'm using a basic RadEditor as below:

<telerik:RadEditor ID="re1" runat="server">
</telerik:RadEditor>

From the HTML mode, I enter the following:

<html>
    <head>
        <style>
            span{ color: red !important; }
            div { color: blue !important; }
        </style>
    </head>
    <body>
        <span>should be red</span>
        <div>should be blue</div>
    </body>
</html>

When returning to Design or Preview mode, the DIV is blue, but the SPAN is not red. Do you have any idea why?

The RadEditor is in a page with NO stylesheet.

Thanks,

David

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 27 Sep 2010, 07:28 AM
Hi Dave,

You should disable the ConvertFontToSpan filter, which converts the span tags to font tags when switching to Design mode, because the browser's commands work with font tags. When the content is submitted the font tags are converted to span tags.

Here is an example on how to disable it in the codebehind:

RadEditor1.DisableFilter(EditorFilters.ConvertFontToSpan);

Another approach is to load the following class too:
font{ color: red !important; } 




Kind regards,
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
Tags
Editor
Asked by
Dave
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or