mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
WYSIWYG: Code & table fixes
- Fixed new code block insertion to remove selection area instead of just adding after. - Added default table column widths to not be collapsed - Updated table dom export to not duplicate colgroups.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import {
|
||||
$getRoot,
|
||||
$isDecoratorNode,
|
||||
$isElementNode,
|
||||
$isElementNode, $isRootNode,
|
||||
$isTextNode,
|
||||
ElementNode,
|
||||
LexicalEditor,
|
||||
@ -84,7 +84,7 @@ export function $getNearestBlockNodeForCoords(editor: LexicalEditor, x: number,
|
||||
|
||||
export function $getNearestNodeBlockParent(node: LexicalNode): LexicalNode|null {
|
||||
const isBlockNode = (node: LexicalNode): boolean => {
|
||||
return ($isElementNode(node) || $isDecoratorNode(node)) && !node.isInline();
|
||||
return ($isElementNode(node) || $isDecoratorNode(node)) && !node.isInline() && !$isRootNode(node);
|
||||
};
|
||||
|
||||
if (isBlockNode(node)) {
|
||||
|
Reference in New Issue
Block a user