Problem/Motivation

We're currently on 40.2.0, since #3406732: Update CKEditor 5 to 40.2.0 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

CommentFileSizeAuthor
#11 deprication-notices.png146.75 KBjannakha

Issue fork drupal-3424644

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Title: Update CKEditor 5 to 40.2.0 » Update CKEditor 5 to 41.1.0
Issue tags: -JavaScript +JavaScript

Copy/paste leftover 🤣

wim leers’s picture

Status: Active » Needs review
Issue tags: -JavaScript +JavaScript
Related issues: +#3379104: Add a "CKEditor 5 nightly" GitLab CI job

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. 😮‍💨

wim leers’s picture

Assigned: wim leers » Unassigned

Well that was easy 😄

wim leers’s picture

Status: Needs review » Postponed

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 👍

wim leers’s picture

Title: Update CKEditor 5 to 41.1.0 » Update CKEditor 5 to 41.2.0
Issue summary: View changes
Related issues: -#3402481: CKEditor 5 merges adjacent lists, AdjacentListsSupport plugin fixes this
wim leers’s picture

Assigned: Unassigned » wim leers
Status: Postponed » Needs work

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 🤓
wim leers’s picture

Assigned: wim leers » Unassigned
Issue summary: View changes
Status: Needs work » Needs review

jannakha made their first commit to this issue’s fork.

jannakha’s picture

StatusFileSize
new146.75 KB

MR is applied and working well.

Some deprecation notices in console:

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?

wim leers’s picture

@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.

jannakha’s picture

@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

wim leers’s picture

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! 😄👍

P.S.: are you on Drupal Slack? What's your username there? :)

smustgrave’s picture

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.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

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...
catch’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

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!

finnsky’s picture

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

catch’s picture

Status: Fixed » Needs review
wim leers’s picture

Assigned: Unassigned » wim leers

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)
wim leers’s picture

Assigned: wim leers » Unassigned
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

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:...
catch’s picture

Status: Reviewed & tested by the community » Fixed

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

Status: Fixed » Closed (fixed)

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

quietone’s picture

Issue tags: -10.3.0 release notes

Removing tag because CKEditor was updated later, #3443567: Update CKEditor 5 to 41.3.1