Add CKEditor 5 compatibility and keep supporting CKEditor 4

Created on 14 September 2022, over 2 years ago
Updated 14 November 2023, about 1 year ago

Problem/Motivation

The access check (src/Access/EmbedButtonEditorAccessCheck.php's checkButtonEditorAccess()) method that checks if an embed button is enabled in the editor configuration only supports CKEditor4. With Drupal 10, CKEditor5 comes, and embed should support CKEditor5 too.

Steps to reproduce

-

Proposed resolution

CKEditor5 has some changes in the schema, so the if check and the foreach in this method needs to be adjusted. Also, the first if check throws a HttpException for CKEditor5, which needs to be updated too.

Remaining tasks

- Update if check to allow CKEditor5, e.g.: if (!in_array($editor->getEditor(), ['ckeditor', 'ckeditor5'])) {
- Add a check if an embed button is found in the editor, and change the $has_button variable's value based on it.

User interface changes

-

API changes

-

Data model changes

-

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary balintpekker Budapest, Hungary

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024