[CKEditor5] Missing dependency on drupal.ajax

Created on 16 June 2023, over 1 year ago
Updated 20 June 2023, over 1 year ago

Problem/Motivation

While working in 🐛 [Entity Browser] Tests are failing on D10 Fixed I ran into an error where CKEditor5 stopped working because of the following error:
Drupal.ajax is not a function

I noticed that the library internal.drupal.ckeditor5 doesn't have an dependency on core/drupal.ajax, but is using the function Drupal.ajax

Steps to reproduce

  1. Install Drupal using the minimal installation profile.
  2. Enable ckeditor5 and field_ui modules.
  3. Create a content type and add a body field using CKEditor 5.
  4. Move all fields, except title and body out of the form display (authored by uses Ajax, so adding this field will result in drupal.ajax being loaded.)
  5. Add a CKEditor5 plugin that calls the openDialog method. In my case I used Entity embed. So I enabled the entity_embed module and added the default "Node" embed button.
  6. Create a new node, click on the embed button. The dialog doesn't open.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

9.5

Component
CKEditor 5 

Last updated 1 day ago

Created by

🇧🇪Belgium JeroenT 🇧🇪

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

Comments & Activities

Production build 0.71.5 2024