Delete image button

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2023-07-21 23:04:27 +02:00
parent 856dd277f4
commit eb1feaa182
4 changed files with 35 additions and 15 deletions

View File

@@ -183,7 +183,7 @@ const BlockTypeFloatingToolbar = ({
const selection = $getSelection();
if ($isRangeSelection(selection) || DEPRECATED_$isGridSelection(selection)) {
const selectionNode = selection.anchor.getNode();
selectionNode.replace($createImageNode({ src }));
selectionNode.replace($createImageNode({ altText: '', src }));
}
});
};