Skip to content

Commit

Permalink
IBX-6400: Moving images between lines can result in a disapperance of…
Browse files Browse the repository at this point in the history
… another image
  • Loading branch information
GrabowskiM committed Oct 5, 2023
1 parent 397ff27 commit 3120a4d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 3120a4d

Please sign in to comment.