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

Closing </div> tag removed

1 Answer 53 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 10 Aug 2011, 06:12 PM
I am using two instances of RadEditor to provide the user the ability to "wrap" content within two blocks of html. For example:

Enter HTML TOP (RadEditor)

{content from db}

Enter HTML BOTTOM (RadEditor)

In this way, content from the database is contained in a pretty html template. The problem occurs when you try to put an opening tag inside the HTML TOP and then its closing tag in the HTML BOTTOM (such as a <DIV>).

For instnace, if I place a "<DIV>" in the HTML TOP and a closing "</DIV>" in the HTML BOTTOM what i end up with is "<DIV></DIV>" in the HTML TOP and the "</DIV>" in the HTML BOTTOM is removed. 

Is there a way to turn this auto-correcting feature off? I am 
using the ContentFilters="None" in the declaratively markup but it still does this intrinsic validation.

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Aug 2011, 08:59 PM
Hello Anthony,

It is not supported by the Rich Text Editing engine of the browser to have only an opening <div> or another tag or only a closing </div> tag in the content area. Every HTML tag is a node in the DOM and it should have an opening and closing tag, in other case the content will be invalid HTML/XHTML.

The browser's Rich Text Editing engine checks for unclosed and non well formed tags and corrects or try to correct them automatically without providing a way to disable the browser validation. You can verify my words by testing the attached HTML page with an editable IFRAME element in it. You will reproduce the same behavior with an editable DIV element as well as in our competitors' editors.

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