for maintaining images I use a folder as suggested in https://learn.getgrav.org/16/content/image-linking
Within this folder is an image test.jpg. If I reference it in tinymce like it is defined in the former linked learning-section (using absolute links) it is done by
In frontend, this picture is shown properly - but not within tinymce. To show it in tinymce, the link has to be set to
which - of course - does not work in frontend.
Is it possible to define a base-url for tinymce to add the missing /grav-admin/user/pages for tinymce but disregarding it in frontend?
I took a look at https://www.tiny.cloud/docs/configure/integration-and-setup/#base_url and adapted it to
within tinymce-editor.yaml but it does not work. Neither the url within tinymce is affected, nor the frontend-url of this image.
Thanks a lot for some hints,
@Markus, Did you have a look at the repo of the plugin? The following two issues may be related what you are observing:
According the owner, it should be fixed in development version 1.3.0.
thank your for the links - shame on me, I did not have a look there… Well, I tested tinymce with the supposed development version 1.3.0, where in changelog it’s said:
Deprecated the semi-absolute media path handling in favor of fully relative paths - previously inserted media will keep working
So I changed the url to my image from an absolute
to a directory relative
and it works in tinymce and in frontend. So far so good, but the downside is, that you will have to correct this image-url if you move the page in which the image is implemented. Therefor I would prefer absolute urls. Besides absolute urls are easier for editors to write, because you always have the same path - it does not matter at which level your page is. Perhaps there is a possibility to use base_url within tinymce - but to evaluate this I don’t have the knowledge needed, I think.