hgroup tag issue

2 posts, 0 answers
  1. HSLaw
    HSLaw avatar
    159 posts
    Member since:
    Jan 2006

    Posted 06 Jun 2014 Link to this post


    I try to paste following in the editor HTML view:

        <h1>Title goes here</h1>
        <h2>Subtitle of article</h2>

    When I change to Design and then back to HTML view, the code changed.

    <h1>Title goes here</h1>
    <h2>Subtitle of article</h2>

    How can we solve this?

  2. Ianko
    Ianko avatar
    1890 posts

    Posted 09 Jun 2014 Link to this post


    The described behavior is due to improvements in the RadEditor to generate well formed HTML markup.

    The bug introduced is due to lack of explicit predilection of the block elements, which causes the editor to not recognize some tags as block elements. 

    The feedback portal item related to the task can be followed for updates and possible solutions. 

    I suggest using the following workaround:
    <telerik:RadEditor runat="server" ID="RadEditor1">
              <h1>Title goes here</h1
             <h2>Subtitle of article</h2>
    <script type="text/javascript">
        Telerik.Web.UI.Editor.Utils.isBlockElement = function (element) {
            return this.checkForElement(element, /^(?:body|p|div|h[1-6]|form|fieldset|table|thead|tbody|tr|th|td|ul|ol|li|dl|blockquote|address|hr|nav|hgroup)$/i);


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top