- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Discussed this, 🐛 [drupalImage] Caption images filter incompatible with CKEditor 5 image resizing Closed: duplicate and 🐛 EditorFileReference should compute a px if a % is specified, even though % is not allowed in HTML5 Needs work in detail with Piotrek from CKEditor 5.
He acknowledges this is a long-standing problem, but it's extremely difficult to change this, because it'd cause a support nightmare (unlike Drupal, CKEditor does not have a way to store state about the system, so keeping existing sites on the old behavior and new sites on the new behavior, to allow existing sites to opt in to the new behavior).
We analyzed together how it worked in CKEditor 4, and there indeed A) images always get
width
andheight
in pixels and B) the image resizing changes that width and height, C) resetting to the original uses the loaded image to re-compute thewidth
andheight
.The path forward for this is unclear, but it is being worked on this quarter. Crucially, there was a very good reason to change from the px-based behavior in CKEditor 4 to the absence of px by default and presence of %-width only upon resizing … but that reason was not documented. So the CKEditor 5 team needs to do research to figure out a way forward.
P.S.: enable the
editor_file_reference
aka filter, that will generate the necessarywidth
andheight
… although that is currently broken in some cases due to a recent regression: 🐛 EditorFileReference should compute a px if a % is specified, even though % is not allowed in HTML5 Needs work . - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Upstream issue: https://github.com/ckeditor/ckeditor5/issues/5154.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Discussed this with @Reinmar from CKEditor 5!
This bug has also been frequently reported by other CKEditor 5 users; it's already scheduled to be fixed in the coming months! 👍
However, it is a very complex undertaking for CKEditor 5 to modify this behavior: there are significant backwards compatibility implications for them.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Update from @witeksocha: he's started investigating both the bugs the Drupal community reported as well as all related aspects. So there'll be news on this topic soon-ish probably 😊
- 🇸🇮Slovenia KlemenDEV
Progress on this can be monitored here: https://github.com/ckeditor/ckeditor5/issues/14146
- Status changed to Postponed
over 1 year ago 8:19am 23 August 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
FYI: the related CKEditor 4 issue for Drupal core: #2092871: width and height attributes are empty when inserting an image → .
In last week's meeting with the CKEditor 5 developers, I was told that this is ready to be merged upstream (visible in https://github.com/ckeditor/ckeditor5/issues/14146 because it says "10/10 tasks done" 👍), but it will NOT ship in the September release.
They're aiming to make the September release a minor/patch release with no major breaking changes. Fixing this bug upstream is effectively a major breaking change for most of CKEditor 5's integrators, but not for Drupal.
That's why this will ship in the October release 👍
- 🇸🇮Slovenia KlemenDEV
CKEditor fixed the issue https://github.com/ckeditor/ckeditor5/issues/14146 and https://github.com/ckeditor/ckeditor5/issues/5154
- Status changed to Needs work
about 1 year ago 6:22am 26 September 2023 - Status changed to Postponed
about 1 year ago 1:39pm 2 November 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
The test coverage changes in 📌 [upstream] Update CKEditor 5 to 40.0.0 Needs review prove that the update to CKEditor 5 v40.0.0 fixes this. I will mark this as soon as #3393557 lands.
- Status changed to Fixed
about 1 year ago 10:36am 7 November 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
📌 [upstream] Update CKEditor 5 to 40.0.0 Needs review landed. 🚢
Automatically closed - issue fixed for 2 weeks with no activity.