mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-09-10 17:31:58 +03:00
Allows more reliable removal of details block on backspace at first child position with the details block.
9 lines
261 B
TypeScript
9 lines
261 B
TypeScript
import {DetailsNode} from "@lexical/rich-text/LexicalDetailsNode";
|
|
|
|
export function $unwrapDetailsNode(node: DetailsNode) {
|
|
const children = node.getChildren();
|
|
for (const child of children) {
|
|
node.insertBefore(child);
|
|
}
|
|
node.remove();
|
|
} |