FCKEditor solution – How to store full URL for images (Show absolute path)
Hello Friends,
Today i came across a problem with FCKEditor. When i upload an image from fckeditor Browser Server option, it uploads correctly and insert image in content as well. But if i will send this content in email (for newsletter) than image will not be there as fckeditor inserts relative path in source of image. There should be a complete URL for image if you are sending this content into email. I was trying to find the way that how to insert the full url path when image uploads from FCKEditor.
I was in urgency so i found the alternative solution to make this problem fixed(solved) right away. What i have done is , find the relative path and replace it with full URL path. Look at below line which replace the absolute path inplace of relative path in image source tag.
$msg = str_replace('src="/userfiles/','src="http://www.example.com/userfiles/',$msg);
Thats it.
To know more about programming,JavaScript issues,jQuery,Expression Engine,MYSQL database and Open-source, enter your email address below. We will send you free tutorials.






I am
about 1 year ago
Can anyone tell me how to store value of image url in fckeditor using asp.net for ex(~/userfiles/user.jpg).
I want to replace user.jpg with timestamp
So pls help mw
about 1 year ago
Can anyone tell me how to store value of image url in fckeditor using asp.net for ex(~/userfiles/user.jpg).
I want to replace user.jpg with timestamp
So pls help mw
about 1 year ago
But I don't know in which file i have to replace the following (For ex. Config.js or in another file)
$msg = str_replace('src="/userfiles/','src="http://www.example.com/userfiles/',$msg);
about 1 year ago
But I don't know in which file i have to replace the following (For ex. Config.js or in another file)
$msg = str_replace('src="/userfiles/','src="http://www.example.com/userfiles/',$msg);
about 1 year ago
@Sushant — You need put this statement once you will get the content from FCKEditor(took content in $msg). Data from FCKEditor contains the relative path. Once you will write the above statement it will replace relative path with absolute path. So if you send the content in mail than image will appear in email.
about 1 year ago
@Sushant — You need put this statement once you will get the content from FCKEditor(took content in $msg). Data from FCKEditor contains the relative path. Once you will write the above statement it will replace relative path with absolute path. So if you send the content in mail than image will appear in email.
about 5 months ago
No matter where to put this code, who can give me a tip? – I´ve searched for files with $msg, there are multiple and so don´t know to integrate to what file…