From 9265e0d1c1ca9290101f4dc9cfdecd35254e7be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Mon, 26 Oct 2026 13:05:46 +0100 Subject: [PATCH] fix: CKEditor 5 list item ids no longer end up in the content CKEditor 5 saves a data-list-item-id attribute on every list item, which it only needs inside the editor; it bloated the frontend HTML and the RTE content the API and the content feed hand to MyE&P. Both RTE presets now import ep_theme's Processing.yaml, which removes the attribute on the way into the database (exitHTMLparser_db); everything else passes unchanged. Content saved since the go-live is cleaned once by hand after the deploy (.ddev/plans/sql/2026-10-26-rte-list-item-ids.sql). Checked locally as an editor: an RTE field with list item ids is stored without them, other attributes (class on li, data-* on links) stay; without the change the ids are stored. Co-Authored-By: Claude Opus 5.5 --- packages/ep_theme/Configuration/RTE/Default.yaml | 1 + packages/ep_theme/Configuration/RTE/Minimal.yaml | 1 + packages/ep_theme/Configuration/RTE/Processing.yaml | 10 ++++++++++ 3 files changed, 12 insertions(+) create mode 100644 packages/ep_theme/Configuration/RTE/Processing.yaml diff --git a/packages/ep_theme/Configuration/RTE/Default.yaml b/packages/ep_theme/Configuration/RTE/Default.yaml index 5f2866c..2edaf12 100644 --- a/packages/ep_theme/Configuration/RTE/Default.yaml +++ b/packages/ep_theme/Configuration/RTE/Default.yaml @@ -1,5 +1,6 @@ imports: - { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" } + - { resource: "EXT:ep_theme/Configuration/RTE/Processing.yaml" } - { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" } - { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" } diff --git a/packages/ep_theme/Configuration/RTE/Minimal.yaml b/packages/ep_theme/Configuration/RTE/Minimal.yaml index 27a1054..0a47d6b 100644 --- a/packages/ep_theme/Configuration/RTE/Minimal.yaml +++ b/packages/ep_theme/Configuration/RTE/Minimal.yaml @@ -1,5 +1,6 @@ imports: - { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" } + - { resource: "EXT:ep_theme/Configuration/RTE/Processing.yaml" } - { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" } - { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" } diff --git a/packages/ep_theme/Configuration/RTE/Processing.yaml b/packages/ep_theme/Configuration/RTE/Processing.yaml new file mode 100644 index 0000000..3de8e96 --- /dev/null +++ b/packages/ep_theme/Configuration/RTE/Processing.yaml @@ -0,0 +1,10 @@ +# CKEditor 5 writes a data-list-item-id attribute to every list item it saves; it is only used inside the +# editor. Removed on the way into the database, everything else passes unchanged. +processing: + exitHTMLparser_db: + keepNonMatchedTags: 1 + tags: + li: + fixAttrib: + data-list-item-id: + unset: 1