Install
Works with Drupal: ^10.3 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
New plugin:
attribute roundtrip
ckeditor5_roundtrip_br preserves class and style attributes on <br> tags.
CKEditor 5's soft-break model element carries no attributes, so any class= or style= on a <br> is silently dropped:
<br class="d-block" style="display:none"> becomes <br>This plugin replaces each such <br> with a GHS-compatible <span> proxy before the HTML is parsed, then converts it back when the data is written. No toolbar button, no settings.
New plugin: table cell attribute roundtrip
ckeditor5_roundtrip_table_cell preserves three table and cell attributes that CKEditor 5 discards as default values:
margin:0 autoon<table>. The Table plugin's style normaliser expands the margin shorthand and dropsauto(not a numeric length), so a centred table loses its centring:
margin:0 auto becomes margin-top:0;margin-bottom:0align="left"on<td>and<th>. CKEditor treatsleftas the default for<td>and omits it on downcast. For<th>, browsers default to center, so removingalign="left"changes the visible layout.valignandvertical-align:middleon<td>/<th>.middleis CKEditor's internal default for vertical cell alignment and is omitted on downcast. Authors who write bothvalign="middle"(for email clients) andstyle="vertical-align:middle"(for browsers) lose both on the first save.
All three use a stash-and-restore approach: a private data attribute is set before parsing and removed when the data is written back. No toolbar buttons, no settings.
Fixed: radio inputs in <form> wrapped in <p>
Radio inputs that share a <form> with a <table> were wrapped in a <p> by ckeditor5_roundtrip_inline_run. This broke CSS :checked + sibling carousel selectors. <form> is valid HTML5 flow content; it now joins <blockquote> in the always-wrap list.
Fixed: image-only <label> deleted in table cells
An <img> inside a <label> inside a <td> or <th> was consumed by CKEditor's Image plugin, leaving the <label> as an empty inline element that was then discarded. This deleted carousel arrow and accordion toggle controls that use image-only labels. ckeditor5_roundtrip_inline_run now wraps inline runs inside table cells unconditionally, which preserves the label.
Fixed: percentage CSS width moved to HTML attribute and height injected
ckeditor5_roundtrip_alignment Fix 3 (remove pixel dimensions injected on CSS-sized images) is extended to also handle percentage widths:
<img style="width:100%" alt=""> becomes <img width="100%" height="100%" alt=""> (CSS property removed) <img style="width:50%;max-width:200px" alt=""> becomes <img style="max-width:200px" width="50%" height="50%" alt="">
Both cases are now restored: the percentage width goes back to the style attribute and the injected height attribute is stripped.
Tests
- 83 FunctionalJavascript tests, 1119 assertions.
- 1 failure was a pre-existing Drupal login timing flake (the test logged in successfully but the redirect assertion raced the page load); it passes when re-run alone.
- Verified in a live Full HTML editor with Playwright, through the author path (paste source, toggle, Save to database) for all eight defects.
Upgrading from 1.0.2
No database updates and no configuration changes are required. Clear caches after updating so Drupal discovers the two new plugins and their libraries.