Closed mkis- closed 10 years ago
Hi.
The plugin inserts an <img>
tag using var imgstr = "<img src='" + json["image"]["url"] + "'";
, so you might want to make sure your controller responds with an absolute URL, and not a relative. For example using the _url
helpers in Rails, and not _path
.
I've also configured my TinyMCE instances to translate relative URLs to absolute when saving (relative_urls: false
in TinyMCE3), which might also help.
I see. Thanks for the info.
I'm using your gem in a Rails project that uses Active Admin. It provides forms for creating/editing models, at preset routes.
When creating a new model, the form is located at:
When editing a model, it is located at:
Since the forms are at a different depth, images I uploaded while creating the model don't show up when editing it, as their relative paths point to the wrong location. This only affects the editor and said images have the correct paths otherwise.