I am using 4.0.1 and having the following issue. If I insert an image in rich text editor and paste url into url field instead of picking image locally stored in media section eg http://l.yimg.com/i/i/uk/metro/steth.jpg then publish page all works fine my image tag has full url.
Now if my website is www.mysite.com and in my media folder I have image, before inserting image in rich text editor I goto media section find image I am interested in then click on image, this opens in new window I then copy the full url eg http://www.mysite.com/media/12345/someimage.jpg I then in rich text editor insert image again but this time paste full url. I then save and publish. The src for my image tag becomes /media/12345/someimage.jpg and not the expected http://www.mysite.com/media/12345/someimage.jpg. Looks like umbraco is stripping full url.
The reason why I am inserting images in this way is that I have created a newsletter template, my site users can create newsletters save and publish then view the page and copy the html of the page and paste it into their preferred newsletter mailer. So any image paths need to be full not relative else images in email client will not appear. Is there a way of stopping the full url from being stripped from the image?
I have seen this with links as well. Umbraco does strip the domain part if it matches the current domain you are working in, and I have not been able to find a setting that disables this.
The way I fixed it was by RegEx'ing the output, and reinserting the domain name when doing stuff like rss feeds and so on.
Many thanks for the suggestions have upped all the good ones via like button.
1. Peter the useDomainPrefixes does not work with media
2. Peter tried changing the tinyme settings also change one extra one namely relative_urls:0 no joy also one issue with this will be upgrades and keeping note.
3. Dan,Morten looks like its time for some regex magic :-}
Full url issue with insert image
Guys,
I am using 4.0.1 and having the following issue. If I insert an image in rich text editor and paste url into url field instead of picking image locally stored in media section eg http://l.yimg.com/i/i/uk/metro/steth.jpg then publish page all works fine my image tag has full url.
Now if my website is www.mysite.com and in my media folder I have image, before inserting image in rich text editor I goto media section find image I am interested in then click on image, this opens in new window I then copy the full url eg http://www.mysite.com/media/12345/someimage.jpg I then in rich text editor insert image again but this time paste full url. I then save and publish. The src for my image tag becomes /media/12345/someimage.jpg and not the expected http://www.mysite.com/media/12345/someimage.jpg. Looks like umbraco is stripping full url.
The reason why I am inserting images in this way is that I have created a newsletter template, my site users can create newsletters save and publish then view the page and copy the html of the page and paste it into their preferred newsletter mailer. So any image paths need to be full not relative else images in email client will not appear. Is there a way of stopping the full url from being stripped from the image?
Thanks
Ismail
Have you tried setting the useDomainPrefixes option in the umbracoSettings.config? This will ensure that the domain is appended.
Not sure if it works for media though?
Peter
I have seen this with links as well. Umbraco does strip the domain part if it matches the current domain you are working in, and I have not been able to find a setting that disables this.
The way I fixed it was by RegEx'ing the output, and reinserting the domain name when doing stuff like rss feeds and so on.
It's configurable in TinyMCE, havn't got a clue on where the config is in Umbraco though ;)
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/remove_script_host
Here is the reference to it in the wiki http://our.umbraco.org/wiki/reference/files-and-folders/files-in-the-config-folder/umbracosettingsconfig
Does it maybe help if you use the BASE tag?
Also, a cheeky littly umbraco.library:Replace($content, '/media/', 'http://yoursite.com/media/') might be enough
Dan
ok apparently you can change the settings that you want absolute urls with tinymce by doing the following.
In Umbraco you can find tinyMCE settings in tiny_mce.js file which is in folder Umbarco/umbraco_client/tinymce3
courtesy of http://jigneshp.wordpress.com/
Guys,
Many thanks for the suggestions have upped all the good ones via like button.
1. Peter the useDomainPrefixes does not work with media
2. Peter tried changing the tinyme settings also change one extra one namely relative_urls:0 no joy also one issue with this will be upgrades and keeping note.
3. Dan,Morten looks like its time for some regex magic :-}
Appreciate all the help
Regards
Ismail
is working on a reply...