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

Inline style not overriding class

1 Answer 107 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 10 May 2011, 09:21 PM

 

Hi, I have a display issue I hope someone can help me with.

When I apply a class to a block of text in the editor, it creates a span tag surrounding the text and assigns
its class attribute properly.  The problem is when I highlight that same block of text and apply
a specific font, the font from the CSS class is displayed in the editor, not the inline style font
value.

The HTML resulting from this is :

<P> <SPAN style="FONT-FAMILY: Times; FONT-SIZE: 24pt" 
class=Headline>This is a test</SPAN></P>

The HTML is what I expect, but the editor displays the font as Verdana (which is specified in the Headline class), not Times. If I paste this HTML into a browser, the font displays as times. Does the editor handle style inheritance differently than the browser?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 12 May 2011, 11:08 AM
Hello Matt,

All you need to do is to disable the ConvertFontToSpan filter of RadEditor which converts the span tags to font tags when the content is displayed in Design mode. This is needed because the browser's commands such as FontName and FontSize work with <font> tags.

You can find more information about the content filters in this article: Content Filters.

Best regards,
Rumen
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Editor
Asked by
Matt
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or