RadEditor changes html structure

2 posts, 0 answers
  1. Taylan
    Taylan avatar
    1 posts
    Member since:
    Dec 2010

    Posted 08 Aug 2011 Link to this post


    we're using RadEditor to edit various html contents in our project. Our requirement is this: We have certain pages with html templates, where the html structure should not change. Only the content (text images etc) should be changed by the users. The problem we have is that some html templates are not full html pages but only internal parts of pages, and they might have structures like

    <!-- top image starts -->
        <td align="center" valign="top" colspan="3">
            <table width="620" align="center" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0">

    i.e. the html starts with <tr> or some other tags which should not be the outermost tags in html. What we've observed is that RadEditor changes this html into this:

            <table width="620" align="center" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0">

    It strips the <tr> and <td> tags and only leaves the <table> tag. We need RadEditor to leave the whole html as it is and not make any changes at all. I've searched the interwebs and checked the RadEditor documentation but I can't find any parameter for RadEditor which does this. Can we have RadEditor leave the html untouched or do we have to find another editor for this purpose?


  2. Rumen
    Rumen avatar
    14031 posts

    Posted 10 Aug 2011 Link to this post

    Hi Taylan,

    Your content is invalid HTML/XHTML and it is the browser which corrects it. The browser validation cannot be stopped and you will experience this problem in our competitors' HTML editors.

    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,
    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.

Back to Top