1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Lexical: Added table column cut/copy/paste support

This commit is contained in:
Dan Brown
2024-08-22 13:28:30 +01:00
parent 8a13a9df80
commit 1ebb0f8c93
8 changed files with 273 additions and 40 deletions

View File

@ -30,13 +30,8 @@ function unserializeNodeRecursive(editor: LexicalEditor, {node, children}: Seria
}
export class NodeClipboard<T extends LexicalNode> {
nodeClass: {importJSON: (s: SerializedLexicalNode) => T};
protected store: SerializedLexicalNodeWithChildren[] = [];
constructor(nodeClass: {importJSON: (s: any) => T}) {
this.nodeClass = nodeClass;
}
set(...nodes: LexicalNode[]): void {
this.store.splice(0, this.store.length);
for (const node of nodes) {