2
votes

This is my code

tinyMCEPopup.editor.execCommand('mceInsertContent', false, '<a href="<ers:redirectURL>https//yahoo.com</a>">xxx</a>');

but the output look like this

<ers:redirectURL>https/yahoo.com</a>

only 1 front slash? https/yahoo.com

I think the cause of problem was <ers:redirectURL> But I need to put this tag <ers:redirectURL> between the URL.

Please help.


Anyway I got the answer. just add this in tinyMCE.init

convert_urls: false

1

1 Answers

0
votes

Shouldn't it be, with ':' in the url, and only one </a> (not sure it will work anyway, with the odd resulting url ) :

tinyMCEPopup.editor.execCommand('mceInsertContent', false, '<a href="<ers:redirectURL>https://yahoo.com">xxx</a>');

Also, to your tiny_mce configuration, add convert_urls : false , and set

'relative_urls : false'