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

Prevent reformatting on Html tab

1 Answer 59 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 19 Jul 2010, 04:28 PM
I sometimes like to format the code in the Html tab to make it more readable (i.e. adding spacing, etc.).  I save the html to a database using the radeditor1.Content property.  When I retrieve the html from the database and assign it back to the .Content property my formatting is lost.  Is there any way to prevent the Html tab from reformatting the code?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 22 Jul 2010, 02:23 PM
Hi Dan,

RadEditor's content area is an editable <iframe> and RadEditor is based on the standard browser's RichTextEditing engine. When adding a content to the content area it is modified by the browser which we cannot prevent. Because of this, the required functionality cannot be achieved.

By default, RadEditor has enabled built-in content filter IndentHTMLContent which is modifying the content to make it more readable. It is possible to disable this filter and implement a custom content filter to apply a custom formatting to match the specific scenario, however, this will not allow storing formatting done in the HTML View.

More detailed information regarding built-in content filters and an example of how to create a custom content filter is available in the following help article and live demo:
Content Filters
Built-in Content Filters
Custom Content Filters

Regards,
Dobromir
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
Dan
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Share this question
or