-
Notifications
You must be signed in to change notification settings - Fork 916
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
tinymce stores full image path instead of server relative path #3281
Conversation
@pxpm I tested, and it's working as expected. Not so long time ago I had to migrate a domain of a Wordpress site, and Wordpress does the same, it stores absolute paths to images. I had to figure out a way to change hundreds of references in the database, an easy find and replace on the SQL may be enough in our case (on Wordpress it was not), anyway it could be avoided. |
I agree with you in half of the question, so as we don't store the absolute path when using an image field. But for a WYSIWYG editor I think it makes sense to store the absolute path, otherwise it would not be WYSIWYG, because you can't In doubt, call master Yoda! ping @tabacitu |
Ugh. You both bring some very good points. Any way TinyMCE lets us store absolute URLs, but without the domain? So:
This would fix both problems, I think. Right? |
Unlikely. <img src="uploads/img.jpg"> Will render different results if you are in |
If paths are relative to the origin, that will not be a problem, so; |
Sure! Didn't think about that, just looked at @tabacitu example! Good news for us, tinymce has that option! Just updated the PR! Thanks |
The inspection completed: No new issues |
refs: #871 (I don't remember linking an issue under 1000, this one is ooooooooold!!!!!)
Problem: When using tinymce with elfinder connector, if you select an image, tinymce would save the relative server path into database thus rendering the usability of the image useless after fetching from database.
Instead of saving
https://backpack.com/uploads/image.jpg
it would store../../../uploads/image.jpg
This makes tinymce store the full image path instead of the relative one.