1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-31 15:24:31 +03:00

Lexical: Added single node enter handling

Also updated media to be an inline element to align with old editor
behaviour.
This commit is contained in:
Dan Brown
2024-09-10 12:14:26 +01:00
parent ced66f1671
commit 2036438203
5 changed files with 79 additions and 18 deletions

View File

@ -197,7 +197,7 @@ export const media: EditorFormDefinition = {
if (selectedNode && node) {
selectedNode.replace(node)
} else if (node) {
$insertNodeToNearestRoot(node);
$insertNodes([node]);
}
});
@ -213,7 +213,7 @@ export const media: EditorFormDefinition = {
updateNode.setSrc(src);
updateNode.setWidthAndHeight(width, height);
if (!selectedNode) {
$insertNodeToNearestRoot(updateNode);
$insertNodes([updateNode]);
}
});