PerfectlyNormal / tinymce-rails-imageupload

Image upload plugin for TinyMCE and Rails with the asset pipeline
MIT License
149 stars 154 forks source link

Wrong assets path #83

Open bonekost opened 7 years ago

bonekost commented 7 years ago

Hey, I think this is tinymce.js problem, but if you got some workaround I would be thankfull

I got tinymce editor in view which is located in: admin/blog_entries/:id/edit

When I try to upload pic I got this in editor: <img src="/assets/blog_entry_images/283/large/xy.jpg?1486844369" alt="" width="640" height="300" data-mce-src="../../../assets/blog_ent.../>

when I save blog_entry to DB and then show it in frontend which is located at: blog/2017/01/24/blog_entry_id

Picture doesn't show because link is: <img src="blog/assets/blog_entry_images/283/large/xy.jpg?1486844369">

Khanitskiy commented 5 years ago

Add relative_urls: false option to config/tinymce.yml file.