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

Content stripping

1 Answer 51 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Orest
Top achievements
Rank 1
Orest asked on 31 Jan 2011, 03:12 PM

Guys,

I need to store html that has following line

<div style="font-family:[[FontFamily_01]]; color: [[FontColor_01]];">    </div>

 When I put this line in the editor my styles are being stripped. What should I do for my content to stay as I entered?  

Thanks

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 31 Jan 2011, 05:24 PM
Hi Orest,

You set a style tag with invalid CSS properties values in the content area of RadEditor which is an editable IFRAME and the browser strips these attribute values. The reported behavior is browser related, it can be reproduced with a standard editable IFRAME element as well as in our competitors' editors and it could not be handled with code.

The solution that I found is to use a custom attribute instead of the style one, e.g.

<div customAttribute="font-family:[[FontFamily_01]]; color: [[FontColor_01]];">    </div>


Kind 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
Orest
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or