[upstream] Update CKEditor 5 to 40.0.0

Created on 12 October 2023, 8 months ago
Updated 3 November 2023, 7 months ago

Problem/Motivation

https://github.com/ckeditor/ckeditor5/releases/tag/v40.0.0

All major breaking changes in this release are for/due to <img height> support (see point 1 below).

All minor breaking changes are for the comments plugin, which Drupal does not use.

Notable in this release:

  1. Support for <img height>, which empty inline elements, which is a big regression for front-end performance for content created in CKEditor 5.

    That's why it was one of the prioritized upstream blockers in ๐ŸŒฑ [meta] [upstream] Prioritized CKEditor 5 upstream blockers Active .

  2. A new "simple list" config option, to disallow markup like <ul><li>a</li><li><p>paragraph 1</p><p>paragraph 2</p></li></ul> and only allow markup like <ul><li>a</li><li>b</li></ul>. This MR allows configuring that:
  3. More UI components were introduced, which could be very powerful and enabling for CKEditor 5 plugins in the contrib space! I think AutocompleteView may be valuable for โœจ Drastically improve the linking experience in CKEditor 5 Needs work for example :)
  4. The functionality requires the use of the BalloonEditor, not the ClassicEditor that we use. I did ask @witeksocha if it'd be possible to just get the drag-and-drop parts without the toolbar, and while it isn't supported out of the box, it "should not be too hard to do". ๐Ÿคž Would be a great feature addition!
  5. I tried the AI demo (which we cannot ship in Drupal enabled by default because it requires a paid API key), and it sure does look nice. It's not able to generate images just yet unfortunately (my prompt: failed, although it generated http://ckeditor.com/docs/images/cute_llama.jpeg ๐Ÿ˜„), but generating 2 paragraphs about Drupal's past and future worked fine: It requires a CKEditor 5 premium license too, so I imagine that those who are interested will soon be able to use it in https://www.drupal.org/project/ckeditor5_premium_features โ†’ .

Proposed resolution

  1. Update core/package.json
  2. yarn --cwd core install && yarn --cwd core build && yarn --cwd core build:ckeditor5-types

Remaining tasks

  1. Get images working again โ€” see #8.
  2. Update path test for the modified ckeditor5_list configuration

User interface changes

New config option:

API changes

None.

Data model changes

The configuration for the ckeditor5_list plugin is modified. An update path is (of course) provided.

Release notes snippet

CKEditor 5 has been updated to 40.0.0. This fixes a long-standing front-end performance problem: until now, images linked in CKEditor 5 generated markup that lacked the image height. This would cause layout shifts after the images had loaded, since the browser could not possibly know the height it had to reserve for the images.

NOTE: this was not a problem if you were uploading images thanks to the setting width & height automatically. But that didn't work for linked images (inserted by URL).

๐Ÿ“Œ Task
Status

Fixed

Version

10.2 โœจ

Component
CKEditor 5ย  โ†’

Last updated 1 day ago

Created by

๐Ÿ‡ง๐Ÿ‡ชBelgium Wim Leers Ghent ๐Ÿ‡ง๐Ÿ‡ช๐Ÿ‡ช๐Ÿ‡บ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024