saveCallback overwritten — causes "has is not a function" error in CKEditor 5

Created on 25 August 2025, 10 days ago

Problem/Motivation

The module uses Drupal.ckeditor5.saveCallback = saveCallback, overwriting the default Map object. This results in a TypeError when .has() is called elsewhere.

Steps to reproduce (required for bugs, but not feature requests)

Please provide information like AI modules enabled, which AI provider, browser, etc.

Enable and configure AI ckeditor module.
Open dialog box for AI assistant.
Try close dialog box.

Proposed resolution

Replace:
Drupal.ckeditor5.saveCallback = saveCallback;

With:
Drupal.ckeditor5.saveCallback.set(dialogSettings.selector || '#drupal-modal', saveCallback);

Remaining tasks

Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)

🐛 Bug report
Status

Active

Version

1.1

Component

AI CKEditor

Created by

🇪🇸Spain himanshu5050 Spain

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