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

Editor converts Links wrong

1 Answer 30 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Michael Hauk
Top achievements
Rank 1
Michael Hauk asked on 24 Nov 2008, 03:32 PM
Hi,

I have a Problem with setting a link via Javascript.

I set a link like
"<A> class=LINK HREF="##LINKSPACER##">TEST</A>" 

Directly after setting the content the Link looks like this
"<A class=LINK href="http://localhost/okkult/olymp/PageEdit.aspx?page_id=7727##LINKSPACER##" HREF="##LINKSPACER##">TEST</A>" 

The Code looks like

 

var text = "<A class=LINK HREF="##LINKSPACER##">TEST</A>";  
alert(text);  
editor.set_html(text);  
alert(editor.get_html());  
 

How can I disable this behavior?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 26 Nov 2008, 02:40 PM
Hi Michael,

It is Internet Explorer that converts the relative links to absolute. Please, set the true parameter of the get_html() method and see whether the problem still persists, e.g.

var text = "<A class=LINK HREF="##LINKSPACER##">TEST</A>"; 
alert(text); 
editor.set_html(text); 
alert(editor.get_html(true)); 


Kind regards,
Rumen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Editor
Asked by
Michael Hauk
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or