Skip to content

DGMEditorCore

The core editor component that is a wrapper component for Editor.

Properties

PropTypeDefault
optionsPartial<EditorOptions>
pluginsPlugin[]
enabledbooleantrue
darkModebooleanfalse
showGridbooleanfalse
snapToGridbooleanfalse
snapToObjectsbooleanfalse
onMount(editor: Editor) => void
onSelectionChange(selections: Shape[]) => void
onCurrentPageChange(page: Page) => void
onActiveHandlerChange(handlerId: string) => void
onActiveHandlerLockChange(lock: boolean) => void
onShapeCreate(shape: Shape) => void
onShapeInitialize(shape: Shape) => void
onTransaction(tx: Transaction) => void
onAction(action: Action) => void
onUndo(action: Action) => void
onRedo(action: Action) => void
onDblClick(event: DblClickEvent) => void
onZoom(scale: number) => void
onScroll(origin: number[]) => void
onDragStart(dragEvent: DragEvent) => void
onDrag(dragEvent: DragEvent) => void
onDragEnd(dragEvent: DragEvent) => void
onFileDrop(fileDropEvent: FileDropEvent) => void