21 / 24
21
API Reference

Component props and configuration

EditorProvider

Wraps your editor and provides the Zustand store context for all editor operations.

PropTypeDefaultDescription
initialContainerContainerNode-Initial content structure (alternative to initialState)
initialStateEditorState-Complete initial state including history and metadata
onChange(state: EditorState) => void-Callback fired on every state change
debugbooleanfalseEnable debug logging to console
childrenReactNode-Editor components to render

Editor

The main editor component that renders the editing interface.

PropTypeDefaultDescription
readOnlybooleanfalseView-only mode -- renders content without editing capabilities
onUploadImage(file: File) => Promise<string>-Custom image upload handler -- return the uploaded URL
notionBasedbooleantrueEnable Notion-style features (cover image, first header spacing)
onNotionBasedChange(v: boolean) => void-Callback when Notion mode is toggled

CompactEditor

Self-contained editor with built-in provider and inline toolbar.

PropTypeDefaultDescription
initialContainerContainerNode-Initial content structure
readOnlybooleanfalseView-only mode
onUploadImage(file: File) => Promise<string>-Custom image upload handler
onChange(state: EditorState) => void-Callback on state changes
Documentation | Mina Rich Editor