Update CKEditor 5 to 41.2.0

Created on 29 February 2024, 4 months ago
Updated 1 May 2024, about 2 months ago

Problem/Motivation

We're currently on 40.2.0, since 📌 Update CKEditor 5 to 40.2.0 RTBC on December 13, 2023.

CKEditor 5 has released:

Changes that likely impact Drupal:

  • minor breaking change in 41.0.0 that likely breaks contrib modules: engine: Renamed export of the View class to EditingView. See #15511. → this is why a single change in Drupal core's CKEditor 5 plugins was required this time around: https://git.drupalcode.org/project/drupal/-/merge_requests/6832/diffs?co...
  • minor breaking change in 41.0.0: link: Added validation to the URL field to disallow empty URLs by default. See #12501.→ this is the behavior we've been expecting for years, so this is good to see: no more nonsensically empty links (<a href="">ceci n'est pas un lien!</a>) — see https://github.com/ckeditor/ckeditor5/issues/12501

Proposed resolution

  1. Update core/package.json
  2. yarn --cwd core install && yarn --cwd core build && yarn --cwd core build:ckeditor5-types
  3. git add core/assets/vendor/ckeditor5 (to ensure newly added files, typically translations, are also committed)

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

CKEditor 5 has been updated to 41.2.0

📌 Task
Status

Fixed

Version

10.3

Component
CKEditor 5 

Last updated about 8 hours ago

Created by

🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

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

Merge Requests

Comments & Activities

  • Issue created by @Wim Leers
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    Copy/paste leftover 🤣

  • Status changed to Needs review 4 months ago
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    Based on the results from January 29 over at #3379104-35: Add a "CKEditor 5 nightly" GitLab CI job , I already know tests will fail. 😮‍💨

  • Merge request !6832Resolve #3424644 "Cke5 41" → (Open) created by Wim Leers
  • Pipeline finished with Failed
    4 months ago
    Total: 495s
    #107028
  • Pipeline finished with Success
    4 months ago
    Total: 534s
    #107048
  • Issue was unassigned.
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    Well that was easy 😄

  • Status changed to Postponed 4 months ago
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    In a meeting with the CKEditor 5 team just now, there's going to be a 41.2.0 release next week, so let's wait for that 👍

  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺
  • Assigned to Wim Leers
  • Status changed to Needs work 4 months ago
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    https://github.com/ckeditor/ckeditor5/releases/tag/v41.2.0 is out 👍

    Some very interesting new things:

    1. CKEditor 5 v41.2.0 introduces the Accessibility Help Dialog, which is something CKEditor 4 also used to have!
    2. link: Added the ability to specify allowed URL protocols by introducing the link.allowedProtocols configuration property. Closes #14304. (commit) -> doesn't really affect us because the default (only allowing HTTP/HTTPS/MAILTO) has served us fine so far. But a contrib/custom module may have additional needs, so then this makes sense 👍
    3. html-support: Background color style should be properly preserved by GHS while the FontBackgroundColor plugin is enabled. It should also be able to preserve a partly defined style. Closes #15757, #10399. (commit) → I'm sure this will help sites with … more "complex" content
    4. paste-from-office: It now should be possible to paste charts from Microsoft Word. Closes #15758. (commit) → surely an important fix for some
    5. source-editing: Source editing should not add whitespaces to the pre-formatted code lines. Closes #15084. (commit) → reported by yours truly: https://github.com/ckeditor/ckeditor5/issues/15084 🤓
  • Issue was unassigned.
  • Status changed to Needs review 4 months ago
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺
  • Pipeline finished with Success
    4 months ago
    Total: 496s
    #114576
  • First commit to issue fork.
  • 🇦🇺Australia jannakha Brisbane!

    MR is applied and working well.

    Updated MR to fix deprecation notices:
    https://ckeditor.com/docs/ckeditor5/latest/api/module_list_documentlistp...

    Question:
    new AccessibilityHelp component of CKEditor - how should that be implemented? Added to the core just like other components? or a separate contrib module?

    Question:
    Is this going to be backported to D10.2/3?

  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    @jannakha Ohhhh! Well-spotted! Thank you 🫣🙏😄

    RE: AccessibilityHelp: I contemplated doing that. I was thinking it'd be preferred to do that in a follow-up issue, because we may want to change the Standard install profile's default text editors to have this button enabled by default…

    RE: 10.2/10.3: this will land in 10.3 for sure, because 10.3.0 has not been released yet. This will not be backported to 10.2.0, because it's a major version bump of CKEditor 5, and includes breaking changes.

  • 🇦🇺Australia jannakha Brisbane!

    @Wim Leers!
    awesome! I'll test this MR more on my sites to get this released sooner!

    I've created a new task for AccessibilityHelp so it can be developed independently from this issue: https://www.drupal.org/project/drupal/issues/3427039 Implement AccessibilityHelp plugin for CKEditor5 Active

  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    Thanks, @jannakha! Followed up on that issue.

    This issue is now ready for RTBC — and I think @jannakha is uniquely qualified to do so, because she spotted the thing I overlooked! 😄👍

  • 🇺🇸United States smustgrave

    So I applied the MR locally this morning.
    Did some content creation in the ckeditor, using all the buttons I can.
    I see drupalmedia changed so I tested embedding media bundles in the ckeditor and that was still working for me.

    Update seems fine +1, but will leave in review for additional eyes.

  • Status changed to RTBC 4 months ago
  • 🇺🇸United States smustgrave

    Tested again today and still not seeing any regression.

    • catch committed b0956713 on 10.3.x
      Issue #3424644 by Wim Leers, jannakha, smustgrave: Update CKEditor 5 to...
    • catch committed 4da21f1a on 11.x
      Issue #3424644 by Wim Leers, jannakha, smustgrave: Update CKEditor 5 to...
  • Status changed to Fixed 4 months ago
  • 🇬🇧United Kingdom catch

    Thanks for the testing, makes sense to get this in asap so it's available during the alpha and later. Added to the 10.3.0 release notes draft.

    Committed/pushed to 11.x and cherry-picked to 10.3.0, thanks!

  • 🇷🇸Serbia finnsky

    Seems also translations should be added
    After i runned yarn build
    https://gyazo.com/33ccb78419f7a2dc0588b527b88d2bcf

  • Merge request !7052Missed translations → (Open) created by finnsky
  • Status changed to Needs review 3 months ago
  • 🇬🇧United Kingdom catch
  • Assigned to Wim Leers
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    Oh weird … you're right: 🫣

    $ git status -- core/assets/vendor/ckeditor5/
    On branch 11.x
    Your branch is up to date with 'origin/11.x'.
    
    nothing to commit, working tree clean
    
    $ yarn --cwd core build
    <SNIP>
    
    $ git status -- core/assets/vendor/ckeditor5/
    On branch 11.x
    Your branch is up to date with 'origin/11.x'.
    
    Untracked files:
      (use "git add <file>..." to include in what will be committed)
    	core/assets/vendor/ckeditor5/autoformat/translations/
    
    nothing added to commit but untracked files present (use "git add" to track)
    
  • Issue was unassigned.
  • Status changed to RTBC 3 months ago
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    The testUnmanagedGitIgnoreWhenGitNotAvailable failure is happening all across core; that's unrelated to this MR.

    Repeated #23 locally on top of the branch that @finnsky pushed, and confirmed that I get identical results.

    ⚠️ I've updated the issue summary to ensure the next CKEditor 5 update doesn't repeat this mistake.

    • catch committed 1486856a on 10.3.x
      Issue #3424644 by Wim Leers, jannakha, finnsky, smustgrave, catch:...
    • catch committed 27a45227 on 11.x
      Issue #3424644 by Wim Leers, jannakha, finnsky, smustgrave, catch:...
  • Status changed to Fixed 3 months ago
  • 🇬🇧United Kingdom catch

    Committed/pushed to 11.x and cherry-picked to 10.3.x, thanks!

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • 🇳🇿New Zealand quietone New Zealand

    Removing tag because CKEditor was updated later, 📌 Update CKEditor 5 to 41.3.1 Fixed

Production build 0.69.0 2024