DGMFrameNameInplaceEditor
The frame name inplace editor component which allows user to edit the frame name on the canvas.
Here is an example how to mount a frame name inplace editor to the editor.
import { Editor, Frame } from "@dgmjs/core";import { DGMEditorCore, DGMFrameNameInplaceEditor } from "@dgmjs/react";
function Editor() { const [editor, setEditor] = useState<Editor | null>(null); const [editingFrame, setEditingFrame] = useState<Frame | null>(null);
return ( <DGMEditorCore onMount={(editor) => setEditor(editor)} > <DGMFrameNameInplaceEditor editor={editor as Editor} onOpen={(shape) => setEditingFrame(shape)} /> </DGMEditorCore> }}Properties
| Prop | Type | Default |
|---|---|---|
editor | Editor | |
onOpen | (shape: Frame) => void |