Quick Tip – TinyMCE : Use full url while inserting image

fi-tinymce

Problem:This is a common scenario. You are using tinyMCE in admin of a site to insert a link to image.  While displaying that image on frontend tinyMCE makes it relative path instead of absolute.
Solution:
When setting up tinyMCE set these 2 configuration options:

 

Both these options are true by default. As the name implies, “remove_script_host” removes the protocol and host part of URLs. “relative_urls” must be set to false is you want to set “remove_script_host” to false.

TinyMCE documentation for relative_urls and remove_script_host.

Hope it helps.

Related Posts

One thought on “Quick Tip – TinyMCE : Use full url while inserting image”

Leave a Reply