Link attribute order

2 posts, 0 answers
  1. HWNeil
    HWNeil avatar
    8 posts
    Member since:
    Mar 2010

    Posted 09 Jan 2012 Link to this post


    We use Telerik Editor as part of the OpenText Context Management System (although I'm not sure what version).

    I've noticed that when entering links in the text editor, the order of the HTML attributes is always changed to follow a certain order.

    Entering the following test links…

    <li><a href="" title="Example" class="test" rel="external">Example 1</a></li>

    <li><a title="Example" rel="external" href="" class="test">Example 2</a></li>

    …always produces:

    <li><a class="test" title="Example" rel="external" href="">Example 1</a></li>

    <li><a class="test" title="Example" rel="external" href="">Example 2</a></li>

    Being able to control the order for consistency is great but we would prefer to have href first as it is the most common…having a logical order can help with gzip page size (Google recommends href then alphabetising the rest, e.g., href class rel title). 

    Is it possible to override the specified ordering to change to our preference?



  2. Rumen
    Rumen avatar
    14459 posts

    Posted 09 Jan 2012 Link to this post


    The content area of RadEditor is editable IFRAME, which uses the underlining Rich Text Editing engine of the browser where it operates. The observed behavior is browser behavior and it is the browser that rearranges the attributes order in the HTML tags. You can reproduce the same behavior in the attached HTML page having an editable IFRAME elements in it as well as in our competitors' editors.

    Unfortunately, it is not possible to control this browser behavior with code and override it.

    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
Back to Top