Nesting <p> tag being created when using Add Paragrah button in IE

3 posts, 0 answers
  1. Arjun
    Arjun avatar
    6 posts
    Member since:
    Oct 2012

    Posted 14 Oct 2012 Link to this post

    When using Add Paragraph button in the HTML editor, if the paragraph is inside a table cell, then we will create some <p> tag nested within another <p> tag. HTML standard doesn't support <p> nested inside another <p> tag. 

    Steps to reproduce,

    1. Create a 1 cell table, add some text to the table cell in any HTML editor
    2. Now select the text and click center align icon , increase the fornt, change the font -> switch to HTML view and you will notice the <p align> being added
    3. Go back to the design view -> Click on the empty space between aligned text -> click on "Enter" to go to next line >  Click the Add Paragraph icon twice -> You should have the nested <P> tag. I've put the result HTML code in the comment section.

    The datatags marked in yellow is nested inside datatag marked in red, this should not be the case.

     This datatag is in IE






                <P align=left>&nbsp;<SPAN style="FONT-FAMILY: 'Palatino Linotype', 'Book Antiqua', Palatino, serif; FONT-SIZE: 16px">this is my final <BR>




                <P  align=left>text</P>


                <P align=left>&nbsp;</P>






    The nested P tag is creating random issues in the past and it's creating junk code under some circumstances.  Can we fix this?

  2. Rumen
    Rumen avatar
    14459 posts

    Posted 15 Oct 2012 Link to this post


    It seems that you have disabled the ConvertToXhtml filter of RadEditor. You should enable it so that RadEditor validates and corrects the produced content.

    Best regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Arjun
    Arjun avatar
    6 posts
    Member since:
    Oct 2012

    Posted 17 Oct 2012 Link to this post

    Works fine now.

Back to Top