mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-07-15 21:31:36 +03:00
Lexical: Fixed diagrams not updating on edit
Caused by lack of proper key use on clone
This commit is contained in:
@@ -27,7 +27,7 @@ export class DiagramNode extends DecoratorNode<EditorDecoratorAdapter> {
|
||||
}
|
||||
|
||||
static clone(node: DiagramNode): DiagramNode {
|
||||
const newNode = new DiagramNode(node.__drawingId, node.__drawingUrl);
|
||||
const newNode = new DiagramNode(node.__drawingId, node.__drawingUrl, node.__key);
|
||||
newNode.__id = node.__id;
|
||||
return newNode;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {EditorDecorator} from "../framework/decorator";
|
||||
import {EditorUiContext} from "../framework/core";
|
||||
import {BaseSelection, CLICK_COMMAND, COMMAND_PRIORITY_NORMAL} from "lexical";
|
||||
import {DiagramNode} from "@lexical/rich-text/LexicalDiagramNode";
|
||||
import {$selectionContainsNode, $selectSingleNode} from "../../utils/selection";
|
||||
|
||||
Reference in New Issue
Block a user