Loading
🤖 fix: #3617651 Edit rich text in the text format's own CKEditor 5
Problem
The translation editor bundled its own seven-plugin CKEditor. Markup the text format allows beyond those plugins (media embeds, headings, tables, data-entity-* link attributes, lang) was dropped and saved as the translation.
Fix
Rich text is now edited in the text format's own CKEditor 5, the same core editor Canvas uses.
- New
GET /canvas-translate/api/editor-assets?formats=…returns the editor settings and JS/CSS that core would attach for those formats.ajax_page_state[libraries]keeps them from loading twice. - The extension loads these assets into its iframe and attaches the editor through core's
Drupal.editors.ckeditor5. - Formats without a CKEditor 5 editor, or an editor that fails to load, fall back to editing as HTML.
- Bundled CKEditor packages removed: JS bundle 1.28 MB → 595 KB.
Tests
- Kernel:
EditorAssetsControllerTest. - Playwright: a heading, managed link,
langand<drupal-media>survive copy source → edit → publish. A second format loads its own editor without reloading core.
Out of scope
Translators can still edit formats they lack "use text format" for, as on 1.0.x (follow-up).
Closes #3617651.
Edited by Fons Vandamme