I use CKEDITOR to create newsletters. Everything went fine, but when I send the newsletters by e-mail, the images stored there are not displayed. The problem was caused by CKEDITOR, using a relative path for image sources, for example. <img src='/newsletter_images/news1/img1.jpg'> .
I want CKEDITOR to use absolute URLs, for example:
<img src='http://www.mydomain.com/newsletter_images/news1/img1.jpg' />
The initialization I tried looks like this:
<script type="text/javascript"> $(document).ready(function() { $('#editor1').ckeditor({ baseHref: "http://www.google.com/" }); }); </script>
but does not work.
Some messages found using baseUrl and baseDir can solve the problem. I tried this:
$('#editor1').ckeditor({ baseHref: "http://www.mydomain.com/", baseUrl: "http://www.mydomain.com/newsletter/", baseDir: "/newsletter/" });
but that didn't work either.
source share