Problem with insert/update links with tinyMCE

Am I the only person that finds the TinyMCE relative_urls option confusing ?

If you're writing an article/blog post and want to include a ink to a web site other than one you're on, I think the term "absolute URL" describes what you want. You want to put "http://www.somesite.com" and not have TinyMCE put either a forward slash '/' or a relative path '/mysite/' in front of it.

Surprisingly, if you set the following :

tinyMCE.init({
        ...
        relative_urls : false
});

then that's exactly what TinyMCE does :(

But, if you do this :

tinyMCE.init({
        document_base_url : "http://www.somesite.com",
        relative_urls : true
});

Then you seem to get plain, unadulterated links.

Go figure.


Although this question has already been answered. I have my own solution and it could be helpful to some others if the accepted answer does not work.

Please see link below for more info.

tinyMCE.init({
    ...
    convert_urls: false,
});

https://www.tiny.cloud/docs/configure/url-handling/#convert_urls


We needed to set both of these options in order to get TinyMCE to stop rewriting URLs to relative paths.

relative_urls : 0
remove_script_host : 0