From 640419c510f2a37c3e3fc03fd83d089d2472476e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Grabowski?= Date: Thu, 12 Dec 2024 08:53:59 +0100 Subject: [PATCH] IBX-9243: linebreaks in Inline custom tags markup (eztemplateinline) breakes the editor (#194) --- .../inline-custom-tag/inline-custom-tag-editing.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bundle/Resources/public/js/CKEditor/custom-tags/inline-custom-tag/inline-custom-tag-editing.js b/src/bundle/Resources/public/js/CKEditor/custom-tags/inline-custom-tag/inline-custom-tag-editing.js index ff815715..f891517d 100644 --- a/src/bundle/Resources/public/js/CKEditor/custom-tags/inline-custom-tag/inline-custom-tag-editing.js +++ b/src/bundle/Resources/public/js/CKEditor/custom-tags/inline-custom-tag/inline-custom-tag-editing.js @@ -1,6 +1,7 @@ import Plugin from '@ckeditor/ckeditor5-core/src/plugin'; import Widget from '@ckeditor/ckeditor5-widget/src/widget'; import { toWidget } from '@ckeditor/ckeditor5-widget/src/utils'; +import Element from '@ckeditor/ckeditor5-engine/src/view/element'; import IbexaInlineCustomTagCommand from './inline-custom-tag-command'; @@ -92,6 +93,10 @@ class IbexaInlineCustomTagEditing extends Plugin { const values = {}; for (const configValue of configValuesIterator) { + if (configValue instanceof Element === false) { + continue; + } + const value = configValue.getChild(0)?.data ?? null; values[configValue.getAttribute('data-ezvalue-key')] = value;