From f03aaff7f1dee72d33558a56fe158d4df40c4377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Grabowski?= Date: Mon, 22 Jul 2024 17:14:47 +0200 Subject: [PATCH] IBX-7694: Richtext custom tag attributes don't have effect on existing tags --- .../custom-tags/block-custom-tag/custom-tag-ui.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bundle/Resources/public/js/CKEditor/custom-tags/block-custom-tag/custom-tag-ui.js b/src/bundle/Resources/public/js/CKEditor/custom-tags/block-custom-tag/custom-tag-ui.js index 6b2ba2fd..8396038b 100644 --- a/src/bundle/Resources/public/js/CKEditor/custom-tags/block-custom-tag/custom-tag-ui.js +++ b/src/bundle/Resources/public/js/CKEditor/custom-tags/block-custom-tag/custom-tag-ui.js @@ -120,6 +120,14 @@ class IbexaCustomTagUI extends Plugin { newValues[name] = attributeView.fieldView.element.value; }); + Object.entries(this.formView.attributeViews).forEach(([name, attributeView]) => { + if (newValues[name] !== undefined) { + return; + } + + newValues[name] = attributeView.fieldView.element.value; + }); + this.editor.model.change((writer) => { writer.setAttribute('values', newValues, modelElement); });