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

Editor automatically adds empty rows

3 Answers 54 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Winfried Thieme
Top achievements
Rank 1
Winfried Thieme asked on 14 Apr 2010, 04:10 PM
Some of our users were complaining about automatically added empty rows in their texts. I could reduce the problem to the following html code snippet:

<h1>
 <span style="font-family: times new roman;">Create Instrumentation Loops</span>
</h1>
<p>
 <span style="font-family: times new roman; font-size: 11pt;">bla bla bla </span>
 <span style="font-family: times new roman; font-size: 11pt;">another text
  <p>loop object</p>
 </span>
</p>
<p>&nbsp;</p>
<h1>
 <span style="font-family: times new roman;">Functional Requirements</span>
</h1>

Every time you switch between design or html view (or every time you save) a new line is added (<p>&nbsp;</p>).
What can I do to avoid this?

Winfried

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 14 Apr 2010, 04:19 PM
Hi Winfried,

You can get this error if you edit non well formed HTML content and switch between the Html and Design modes of RadEditor.

The Rich Text Editing engine of the browser that RadEditor's content area IFRAME uses, tries to validate the non well formed content and the <p> tags in it but without success and produces new non valid XHTML content.

This invalid XHTML content misleads the ConvertToXhtml content filter of RadEditor and the editor starts to produce extra paragraphs with every switch between Html and Design mode or when submitting the content. To stop this behavior you can disable the ConvertToXhtml filter

RadEditor1.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertToXhtml);

or instruct your users to validate the content before submitting it using the W3C validator dialog of RadEditor and manually correct it.

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.
0
Winfried Thieme
Top achievements
Rank 1
answered on 14 Apr 2010, 04:25 PM
Hi Rumen,

thanks for your quick answer. Is there a way to disable the ConvertToXHtml filter by configuration? I don't use the editor on my own but as part of the tool "WikiPlus" from "Kwizcom".

And are their any side effects by switching it off?

Best regards

Winfried
0
Rumen
Telerik team
answered on 14 Apr 2010, 04:31 PM
Hi Winfried,

I am not aware of the WikiPlus tool but you can contact its developers and ask them for help. All available ways to disable the content filters are discussed in this help article: Content Filters.

The ConvertToXhtml filter is responsible for the conversion of the HTML from the editor content area to valid XHTML.

All the best,
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
Winfried Thieme
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Winfried Thieme
Top achievements
Rank 1
Share this question
or