Problem/Motivation

This issue on Drupal core has a patch that changes the type of the JavaScript variable Drupal.ckeditor5.saveCallback from a function to a Map object. This requires changes on entity_embed code that uses it, otherwise the following error is shown:
An error occurred during the execution of the Ajax response: TypeError: Drupal.ckeditor5.saveCallback.has is not a function

Proposed resolution

This patch changes the how the Javascript code treats the Drupal.ckeditor5.saveCallback.

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

renanmfd created an issue. See original summary.

mortona2k’s picture

This worked for me.

Without the patch, I was unable to edit a the caption after adding an entity embed.

However this patch conflicts with https://www.drupal.org/project/entity_embed/issues/3410132.

mortona2k’s picture

MR 46 combines this patch and 3410132.

mortona2k’s picture

Rebased on #3410132.

very_random_man’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new37.37 KB

This patch worked for me. Thanks!

I found this also clashed with this: https://www.drupal.org/project/entity_embed/issues/3531672

If anyone else is trying to fix both, I've attached a combined patch I made for both issues.