Full domain path in WYSIWYG?

First time here guys, please be gentle :'D

I want to use the WYSIWYG field to make blogs, and Singelton entries for my Website.
When i try to call the API with the d flag, it won’t give me full paths to the images
I also set up the domain in the yaml file like this:

I get this as a link in the WYSIWYG field:
<img src="/cockpit/storage/uploads/2019/03/28/5c9d1917a97d413885861972_da77195698_b.jpg" alt="" />
but it should be:
<img src=“http://127.0.0.1/cockpit/storage/uploads/2019/03/28/5c9d1917a97d413885861972_da77195698_b.jpg” alt="" />

I’m calling this URL:
http://127.0.0.1/cockpit/api/singletons/get/Mainpage?token=anothertokenbitesthedust&d=true

I saw this
image
and saw that tinyMCE has options for paths:

I added these options:
image

But the Editor is still adding relative URLs, i removed and readdded images, but to no avail.

Welcome @edenprojectde!
Would this help:

I did a quick test with config like this:

{
  "editor": {
    "relative_urls": false,
    "remove_script_host": false,
    "document_base_url": "http://www.site.com/path1/"
  }
}

and it worked as expected when used with relative urls (i.e. setting myImage.png ended up as http://www.site.com/path1/myImage.png).

5 Likes

It works like a charm. Beautiful. :heart_eyes:

1 Like