[regression] Drupal 10.2.0 breaks ability to add language plug-in to CKEditor 5

Created on 3 January 2024, over 1 year ago

Problem/Motivation

With Drupal 10.2.0, I can no longer add the Language plug-in to the toolbar. I get a circular pair of error messages. Fixing one error creates the other, and vice versa.

Steps to reproduce

Scenario 1: Specify values for direction attribute.

1. Go to https://simplytest.me
2. Enter Drupal
3. Select 10.2.0
4. Create site
5. Login as admin
6. Click Manage
7. Click Configuration
8. Click text formats and editors
9. On the row for Basic HTML, click Configure
10. Drag the language plug-in icon into the toolbar

Results:
Error message
The Language plugin needs another plugin to create <span>, for it to be able to create the following attributes: <span lang dir>. Enable a plugin that supports creating this tag. If none exists, you can configure the Source Editing plugin to support it.

CKEditor settings: Manually editable HTML tags contains:
<cite> <dl> <dt> <dd> <a hreflang> <blockquote cite> <ul type> <ol type> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>

Filter settings: Allowed HTML tags contains:
<br> <p> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <cite> <dl> <dt> <dd> <a hreflang href> <blockquote cite> <ul type> <ol type start> <strong> <em> <code> <li> <img src alt height width data-entity-uuid data-entity-type data-caption data-align> <span dir>

11. In Manually editable HTML tags, type <span dir="ltr rtl">
12. Click Save Configuration

Expected result: configuration has been saved and we return to the list of input formats

Actual result: Get error:

Error message
The Language plugin needs another plugin to create , for it to be able to create the following attributes: . Enable a plugin that supports creating this tag. If none exists, you can configure the Source Editing plugin to support it.

13. Refresh the page

14. Drag the language plug-in icon into the toolbar

Results:
Error message
The Language plugin needs another plugin to create <span>, for it to be able to create the following attributes: <span lang dir>. Enable a plugin that supports creating this tag. If none exists, you can configure the Source Editing plugin to support it.

15. In Manually editable HTML tags, type <span dir>
16. Click Save Configuration

Expected result: configuration has been saved and we return to the list of input formats

Actual result: Get error:

Error message
The following attribute(s) are already supported by enabled plugins and should not be added to the Source Editing "Manually editable HTML tags" field: Language (<span dir>).

Proposed resolution

Ideally, recognize that <span dir> has already been added by CKEditor and don't throw the error at steps 10, 12 or 14.
Ideally, don't produce the error at step 16 under any circumstances as I would expect it to do no harm.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

💬 Support request
Status

Closed: works as designed

Version

10.2

Component
CKEditor 5 

Last updated about 21 hours ago

Created by

🇺🇸United States charles belov San Francisco, CA, US

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024