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

Link attribute order

1 Answer 47 Views
Editor
This is a migrated thread and some comments may be shown as answers.
HWNeil
Top achievements
Rank 1
HWNeil asked on 09 Jan 2012, 12:39 PM

Hi

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="http://www.example.com" title="Example" class="test" rel="external">Example 1</a></li>

<li><a title="Example" rel="external" href="http://www.example.com" class="test">Example 2</a></li>

…always produces:

<li><a class="test" title="Example" rel="external" href="http://www.example.com">Example 1</a></li>

<li><a class="test" title="Example" rel="external" href="http://www.example.com">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?

Thanks

Neil

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 09 Jan 2012, 04:41 PM
Hi,

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,
Rumen
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
Tags
Editor
Asked by
HWNeil
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or