Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295968

CKEditor5 does not maintain image alignment when copied from another editor as pasted

$
0
0

Problem/Motivation

When copying aligned block images from one CKEditor instance to another (same page or different page), the alignment is lost, and it appears there is a fallback alignment.

When viewing the source, the <img> element is wrapped in a <figure> element with proper alignment, the source for the pasted version is an <img> element wrapped in a <span>.

The problem does not occur on the CKEditor demo pages on their website, however, it does occur on a vanilla Drupal 10 site stood up on simplytest.me, leading us to believe the problem is related to the integration.

The problem only appears to be related to when you use the "Insert Image" button, but does not seem to happen if you insert an image with media library.

Steps to reproduce

  1. Edit a content type form with at least one CKEditor field instance. The CKEditor instance must have the "Insert Image" button activated in the menu
  2. Click "Insert Image" in the CKEditor instance and add an image
  3. Align the image to the middle
  4. Select all and copy to clipboard
  5. Paste into a different CKEditor instance in your Drupal site (can be the same content type)
  6. The alignment for the image is wrong

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295968

Trending Articles