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:
@ -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]);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user