javascript - TinyMCE: How do you keep relative URLs when uploading images BUT use absolute URL when using "insert link" option? -
tinymce version: 4.3.10
plugin uploading images: jbimages
i need store absolute path of both images , links added form message can emailed. however, toggling "relative_urls" messes 1 of up.
for example:
relative_urls: true
setting results in proper links. however, images uploaded via jbimages result in relative links, no emails. image gets stored "images/21312.png". won't open in email, since it's missing domain prefix.
relative_urls: false
setting results in proper image urls when uploading via jbimages. however, other links prefixed document root url. in other words, link added "example.org" turns "www.example.com/example.org", example.com domain root.
the ideal result links saved absolute , not prefixed, while uploaded images prefixed domain's url.
if there no setting accommodate above, there other plugins allow image uploading body? tried drag , drop, converts image base64 , doesn't work correctly.
thanks
i @ additional parameter:
https://www.tinymce.com/docs/configure/url-handling/#remove_script_host
per docs:
if option enabled protocol , host part of urls returned removed. option used if relative_urls option set false
if disabled, urls returned in format:
http://www.example.com/somedir/somefile.htm
instead of default format:/somedir/somefile.htm
.
the entire topic of url manipulation reviewed here: https://www.tinymce.com/docs/configure/url-handling/
if working other jbimages plugin ask plugin creator if there settings can changed there address issue.
Comments
Post a Comment