1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-09-10 17:31:58 +03:00
Files
bookstack/resources/js/wysiwyg/utils/details.ts
Dan Brown 46613f76f6 Lexical: Added backspace handling for details
Allows more reliable removal of details block on backspace at first
child position with the details block.
2025-08-27 14:09:38 +01:00

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();
}