baseHref ignored in inline editor #5402
Labels
core
The issue is caused by the editor core code.
plugin:wysiwygarea
The plugin which probably causes the issue.
status:confirmed
An issue confirmed by the development team.
type:feature
A feature request.
Type of report
Bug
Provide detailed reproduction steps (if any)
I have been attempting to integrate the inline ckeditor into grapes.js
I have been using the inline ckeditor with a third party image manager. The issue I am running into is that after choosing an image from this manager, ckeditor sets the baseHref for the image using the baseHref for the page, which is not correct. This results in a 404 image not found error. I have tried to set the baseHref in the ckeditor configuration, but it is ignored.
I found a similar issue from 2017 that got closed without any resolution. Hopefully I can work with you guys to provide enough of an example to get this fixed.
#896
Including a simple sample reproducing the issue is also a good idea. It can drastically
decrease the time needed to reproduce the issue by our team, which means it can speed up helping you!
I've created a codepen to help me better explain this:
https://codepen.io/lnewmanheggie/pen/dyjWRpw
Step 1: Open the image upload window and paste 1600x900/p07ryyyj.webp into the url input. Notice that it does not find the image.
Step 2: Open the inspector js console. It logs a 404 of the image it is trying to find, https://cdpn.io/cpe/boomboom/1600x900/p07ryyyj.webp. In this case, I think the baseHref is the codepen url.
Expected result
What is the expected result of the above steps?
Since I set the baseHref in the ckeditor config to be https://ychef.files.bbci.co.uk/, I would expect the full url to be https://ychef.files.bbci.co.uk/1600x900/p07ryyyj.webp instead of the codepen url before it.
Actual result
What is the actual result of the above steps?
Codepen url is prepended to the image instead of the baseHref that was set in the config.
Other details
This is just an example, but what is happening in my application is that the baseHref of the page is https://base-mongoose-10/admin/, but my images come from https://base-mongoose-10/. However, when I choose an image from my image manager, it appears in ckeditor as https://base-mongoose-10/admin/[imageName] instead of https://base-mongoose-10/[imageName], even though I configured my baseHref as https://base-mongoose-10/ in the ckeditor config.
The text was updated successfully, but these errors were encountered: