Install

Works with Drupal: ^10.3 || ^11

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 151.54 KB
MD5: 63f9b41e7c2781a07ec0a9c32f40ac62
SHA-1: 93ea17acbe6cd36aac8532577732fedf20544fe9
SHA-256: 66f89f1a51036db32f910373bcc8d4e4424ab0684ee963841e482926830c553b
Download zip 210.4 KB
MD5: ce55655d740345e524015b66927fc5a7
SHA-1: 5a40fe5968764d1d60ce5b70bca5c63cd44858e1
SHA-256: 8029664770f53cf6c7c51c67346b953d48cc5e333d2ecfc7351c63f690a6bee1

Release notes

ckeditor5_roundtrip 1.0.4

Bug fix: authored image dimensions are preserved on save.
An image that combined a pixel width (the width attribute and/or a style width) with max-width lost its width when the content was saved. CKEditor 5 writes an image’s natural size as width and height attributes after it loads, and moves a style width into a width attribute. The previous cleanup in AlignmentRoundtrip could not tell those injected values from authored ones, so it removed both.

AlignmentRoundtrip now records the dimensions the author wrote each time content enters the editor (initial load and every Source-mode toggle) and restores exactly those values on save. Images resized in the editor keep their new size. Images with no authored dimensions keep the previous behaviour.

Changes
AlignmentRoundtrip: restore authored image width/height attributes and style values on save.
New FunctionalJavascript test: ImageDimensionsRoundtripTest (pixel and percentage widths, max-width, injected natural size, same-source images, repeated saves).
Code comments cleaned up (no functional change).

Compatibility: built against CKEditor 5 47.6, as shipped with current Drupal core. No configuration changes and no update hooks.

Created by: nishchit.dayal
Created on: 23 Nov 2026 at 10:33 UTC
Last updated: 23 Nov 2026 at 10:34 UTC
Bug fixes

Other releases