From 3120a4d641a2bdfbef5b320775450b84caff0172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Grabowski?= Date: Thu, 5 Oct 2023 08:55:54 +0200 Subject: [PATCH] IBX-6400: Moving images between lines can result in a disapperance of another image --- .../public/js/CKEditor/embed/image/embed-image-editing.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bundle/Resources/public/js/CKEditor/embed/image/embed-image-editing.js b/src/bundle/Resources/public/js/CKEditor/embed/image/embed-image-editing.js index b04bcc81..4f883037 100644 --- a/src/bundle/Resources/public/js/CKEditor/embed/image/embed-image-editing.js +++ b/src/bundle/Resources/public/js/CKEditor/embed/image/embed-image-editing.js @@ -90,6 +90,11 @@ class IbexaEmbedImageEditing extends Plugin { dispatcher.on('attribute:previewUrl', (event, data, conversionApi) => { const downcastWriter = conversionApi.writer; const modelElement = data.item; + + if (!modelElement.getAttribute('previewUrl')) { + return; + } + const viewElement = conversionApi.mapper.toViewElement(modelElement); const preview = downcastWriter.createUIElement( 'img',