Get TinyMCE to use full image url instead of relative one

UrlTinymce

Url Problem Overview


I use TinyMCE as editor on a website. Problem is, when I insert images from the same site, TinyMCE will use relative url to the image instead of the fixed url I entered when including the image.

The resulting html is used elsewhere, for example in emails. Problem is, relative urls will not show up properly anywhere but in the original location.

How do I get TinyMCE to use full absolute urls instead of shortened relative ones?

Url Solutions


Solution 1 - Url

Make sure in the javascript initialization you are using, that you have these lines in it:

relative_urls : false,
remove_script_host : false,
convert_urls : true,

Read more: TinyMCE - URL handling options

Solution 2 - Url

As it was previously pointed out, this the correct way:

relative_urls : false,
remove_script_host : false,
convert_urls : true,

HOWEVER, there is one thing to mention that will make you wonder why it's not working even though you have specified the proper text above. Ensure the false and true do NOT have quotes around them.

The following is incorrect:

relative_urls : "false", 

Solution 3 - Url

You can only add convert_urls : false

Here's the documentation http://archive.tinymce.com/wiki.php/Configuration:convert_urls

Solution 4 - Url

Try setting the config parameter relative_urls to false and see if that helps:

http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/relative_urls

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSamView Question on Stackoverflow
Solution 1 - UrlRandy the DevView Answer on Stackoverflow
Solution 2 - UrlAlan FullmerView Answer on Stackoverflow
Solution 3 - Urluser7051147View Answer on Stackoverflow
Solution 4 - Urlsushil bharwaniView Answer on Stackoverflow