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

Content Filtering

1 Answer 71 Views
Editor
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 03 Sep 2008, 06:58 PM
have an issue or want to know how to completely disable the content filtering in the Rad editor.  I need to be able to put any text in a HTML tag like the following, where i need to put style="{MYSTYLE}" in the image tag.

<image style="{MYSTYLE}" src="..." />      ({MYSTYLE} may be filetered):

above filters to:

<image style="" src="..." originalAttribute="src" />

any help would be great...

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 04 Sep 2008, 08:07 AM
Hi John,

You can easily disable all editor's filters with the following code:
RadEditor1.ContentFilters = EditorFilters.None;

However, the style attribute expects to receive as a value a property name, semicolon and a property value, e.g.
style="color: red"

In your scenario you are setting only one of these style value elements and the HTML engine of IE will automatically modify the style="{MYSTYLE}" attribute to style="MYSTYLE: ". You can easily verify that this is not RadEditor behavior using an editable DIV / IFRAME elements. The content area of RadEditor is an editable IFRAME using the rich text editing engine of the browser. For your convenience I have attached an html page with an editable IFRAME in it for test.

Since this behavior is controlled by the browser, but not by RadEditor, my suggestion is to use the following syntax which will not modified by the browser

<image style="MYSTYLE: " src="..." />

or

<image style="MYSTYLE:MyValue" src="..." />


Best regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
John
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or