Errors with CKEditor5 on D9

Created on 6 February 2024, 9 months ago
Updated 5 March 2024, 9 months ago

Whilst migrating a D9 site from CKEditor 4 to 5 in preparation for the D10 upgrade, using ckeditor_mentions for ckeditor5 with realname gives me 2 errors:
- One complains about contextElements not being iterable as it is a function that returns an array instead of just an array.
- Another complains about canEditAt being undefined on the model.

Not sure how this is possible as canEditAt should be available on the model and contextElements is an array in the source code of ckeditor5-mention: https://github.com/ckeditor/ckeditor5-mention/blob/master/src/mentionui....
Only in the built file shipped with this module is it a function.

When I manually change the built file to set contextElement as an array and remove the canEditAt check, it works fine, but obviously I'd rather not create a patch for a built file.

Am I doing something wrong? I tried both recommended version and latest dev version of this module and realname. Should I first be updating this module to 3.0.0-beta2, upgrade to D10 and then switch from CKEditor 4 to 5?

💬 Support request
Status

Needs review

Version

3.0

Component

Code

Created by

🇧🇪Belgium seutje Antwerp

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024