Problem/Motivation

The image caption plugin does not work properly with the undo functionality and the figure element disappears.

Steps to reproduce

1. Enable media embedding through the Media Library in the CKEditor.
2. Enable the image caption plugin.
3. Open a page with a CKEditor instance.
4. Add a media.
5. Edit the media attributes and enable caption.
6. Write some text below or after the media in the editor.
7. Undo by Ctrl+Z.
8. Observe how the figure element added previously by selecting the checkbox "Caption" in the media dialog now disappers.
9. As a consequence the media edit button disapperas as well because it is expecting to find a figure element but there is none and it breaks.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

hchonov created an issue. See original summary.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Project: Drupal core » CKEditor 4 - WYSIWYG HTML editor
Version: 9.5.x-dev » 1.0.x-dev
Component: ckeditor.module » Code

CKEditor has been removed from core, CKEditor 4 is removed from Drupal Core in 10.0.0