Problem/Motivation

https://github.com/ckeditor/ckeditor5/releases/tag/v38.1.0

Proposed resolution

  1. Update core/package.json
  2. cd core
  3. yarn install
  4. yarn build
  5. yarn build:ckeditor5-types

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3370989-2.patch2.44 MBlauriii

Comments

lauriii created an issue. See original summary.

lauriii’s picture

Status: Active » Needs review
Issue tags: -JavaScript +JavaScript
StatusFileSize
new2.44 MB

Checking what testbot thinks 🤞

wim leers’s picture

Issue tags: -JavaScript +JavaScript

Thank you, you beat me to it! 😄

If all is well, then this release with NO major breaking changes (which they explicitly did at our request to address as many of the most-upgrade-blocking problems in #3340578: [meta] [upstream] Prioritized CKEditor 5 upstream blockers as possible during 10.1 rather than waiting for Drupal 10.2 in December! 🙏👍) fixes:

  1. the widely reported Style-support-for-<div> problem: applying a class to a div now works using the UI! #3326261-51: [Style] Add tests for inability to apply styles to <div>, <ul>, <ol>, <table> etc. in CKEditor 5 — and <a> allows applying it to all elements
  2. the often reported "bleeding" of styles: #3326261-51: [Style] Add tests for inability to apply styles to <div>, <ul>, <ol>, <table> etc. in CKEditor 5 — and <a> allows applying it to all elements
  3. #3349893: [upstream] [GHS] CKEditor 5 removes <a>s that wrap HTML elements not natively supported by CKEditor 5

That's 3 issues that are often blocking the switch from CKEditor 4 to 5 solved, one of which is a data loss bug.

Ideally, this release would ship in Drupal 10.1.1!

wim leers’s picture

Priority: Normal » Critical
Status: Needs review » Reviewed & tested by the community

Given that this fixes a critical data loss bug (#3349893: [upstream] [GHS] CKEditor 5 removes <a>s that wrap HTML elements not natively supported by CKEditor 5), bumping to Critical.

Since this passes tests, RTBC'ing.

lauriii’s picture

MINOR BREAKING CHANGES ℹ️
html-support: The htmlAttributes model property has been replaced by html*Attributes, where the * represents the name of the view element. Clients will need to modify their code accordingly by replacing all instances of htmlAttributes with html*Attributes for the respective view elements.

It looks like core is not impacted by this even though we are using htmlAttributes for Drupal Media. This is because we are adding our own use of this attribute, and the underlying APIs are not tied into a specific attribute name.

It does look like this will break at least UI Styles contrib module but it's used by 414 sites. Ideal way to address this would be to remove their usage of htmlAttributes and use the CKEditor 5 core APIs instead.

catch’s picture

Can we open an issue against UI Styles (not necessarily with a patch but at least a heads up)?

catch’s picture

Spoke to @lauriii in irc, UI Styles is still in the progress of updating for 10.1, so we wouldn't be breaking existing sites that use it. Given this fixes critical data loss bugs, I think we should just go ahead and commit it to 10.1.x - but asap so it gets into 10.1.1 where most sites will still be updating from 10.0.x (or 9.5.x) to 10.1.1 rather than just the patch release.

lauriii’s picture

I did some manual testing to confirm that the issues mentioned in #3 are indeed solved. It looks like there's really good progress there! I wasn't able to convert an existing element to a <div> which is needed to be able to close #3326261: [Style] Add tests for inability to apply styles to <div>, <ul>, <ol>, <table> etc. in CKEditor 5 — and <a> allows applying it to all elements. Applying styles to <ul> and <table> worked just as I would have expected. 🤩 Confirmed also that wrapping <a> for elements not supported by CKEditor 5 are retained.

  • catch committed 139732ef on 10.1.x
    Issue #3370989 by lauriii, Wim Leers: Update CKEditor 5 to 38.1.0
    
    (...

  • catch committed fb6023c3 on 11.x
    Issue #3370989 by lauriii, Wim Leers: Update CKEditor 5 to 38.1.0
    
catch’s picture

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

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

wim leers’s picture

#7++ — that's exactly the rationale I mentioned to @lauriii too :)

#8:

I wasn't able to convert an existing element to a div which is needed to be able to close […]

Yes, I called that out in detail over at #3326261-51: [Style] Add tests for inability to apply styles to <div>, <ul>, <ol>, <table> etc. in CKEditor 5 — and <a> allows applying it to all elements. But the critical data loss part is solved 👍

Status: Fixed » Closed (fixed)

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

wim leers’s picture