Skip to content

Vizel API / react/src / VizelProps

Interface: VizelProps ​

Defined in: packages/react/src/components/Vizel.tsx:23

Properties ​

autofocus? ​

ts
optional autofocus?: number | boolean | "all" | "start" | "end";

Defined in: packages/react/src/components/Vizel.tsx:46

Auto focus on mount


bubbleMenuContent? ​

ts
optional bubbleMenuContent?: (props) => ReactNode;

Defined in: packages/react/src/components/Vizel.tsx:80

Custom bubble menu content as a render prop. Receives the bound editor instance so the consumer can drive Tiptap commands from custom controls. Mirrors the Vue <slot name="bubble-menu" :editor> and the Svelte bubbleMenu: Snippet<[{ editor }]>.

Parameters ​

ParameterType
props{ editor: Editor; }
props.editorEditor

Returns ​

ReactNode


children? ​

ts
optional children?: ReactNode;

Defined in: packages/react/src/components/Vizel.tsx:82

Additional children to render inside the editor root


className? ​

ts
optional className?: string;

Defined in: packages/react/src/components/Vizel.tsx:60

Custom class name for the editor container


editable? ​

ts
optional editable?: boolean;

Defined in: packages/react/src/components/Vizel.tsx:44

Whether the editor is editable (default: true)


enableEmbed? ​

ts
optional enableEmbed?: boolean;

Defined in: packages/react/src/components/Vizel.tsx:73

Enable embed option in bubble menu link editor (requires Embed extension)


extensions? ​

ts
optional extensions?: Extensions;

Defined in: packages/react/src/components/Vizel.tsx:58

Additional Tiptap extensions


features? ​

ts
optional features?: VizelFeatureOptions;

Defined in: packages/react/src/components/Vizel.tsx:48

Feature configuration


flavor? ​

ts
optional flavor?: VizelMarkdownFlavor;

Defined in: packages/react/src/components/Vizel.tsx:54

Markdown output flavor. Controls how Markdown is serialized when exporting content.

Default ​

ts
"gfm"

initialContent? ​

ts
optional initialContent?: JSONContent;

Defined in: packages/react/src/components/Vizel.tsx:25

Initial content in JSON format


initialMarkdown? ​

ts
optional initialMarkdown?: string;

Defined in: packages/react/src/components/Vizel.tsx:34

Initial content in Markdown format. If both initialContent and initialMarkdown are provided, initialMarkdown takes precedence.

Example ​

tsx
<Vizel initialMarkdown="# Hello World\n\nThis is **bold** text." />

locale? ​

ts
optional locale?: VizelLocale;

Defined in: packages/react/src/components/Vizel.tsx:56

Locale for translated UI strings


markdown? ​

ts
optional markdown?: string;

Defined in: packages/react/src/components/Vizel.tsx:93

Controlled markdown content. When set, the editor content will be synchronized with this value. Use together with onMarkdownChange for controlled mode.

Example ​

tsx
const [md, setMd] = useState("# Hello");
<Vizel markdown={md} onMarkdownChange={setMd} />

onBlur? ​

ts
optional onBlur?: (props) => void;

Defined in: packages/react/src/components/Vizel.tsx:111

Callback when editor loses focus

Parameters ​

ParameterType
props{ editor: Editor; }
props.editorEditor

Returns ​

void


onCreate? ​

ts
optional onCreate?: (props) => void;

Defined in: packages/react/src/components/Vizel.tsx:103

Callback when editor is created

Parameters ​

ParameterType
props{ editor: Editor; }
props.editorEditor

Returns ​

void


onDestroy? ​

ts
optional onDestroy?: () => void;

Defined in: packages/react/src/components/Vizel.tsx:105

Callback when editor is destroyed

Returns ​

void


onError? ​

ts
optional onError?: (error) => void;

Defined in: packages/react/src/components/Vizel.tsx:116

Callback when an error occurs during editor operations. Provides structured error information for logging or user feedback.

Parameters ​

ParameterType
errorVizelError

Returns ​

void


onFocus? ​

ts
optional onFocus?: (props) => void;

Defined in: packages/react/src/components/Vizel.tsx:109

Callback when editor gets focus

Parameters ​

ParameterType
props{ editor: Editor; }
props.editorEditor

Returns ​

void


onMarkdownChange? ​

ts
optional onMarkdownChange?: (markdown) => void;

Defined in: packages/react/src/components/Vizel.tsx:99

Callback when markdown content changes. Called with the current markdown string when the editor content is updated. Use together with markdown for controlled mode.

Parameters ​

ParameterType
markdownstring

Returns ​

void


onSelectionUpdate? ​

ts
optional onSelectionUpdate?: (props) => void;

Defined in: packages/react/src/components/Vizel.tsx:107

Callback when selection changes

Parameters ​

ParameterType
props{ editor: Editor; }
props.editorEditor

Returns ​

void


onUpdate? ​

ts
optional onUpdate?: (props) => void;

Defined in: packages/react/src/components/Vizel.tsx:101

Callback when content changes

Parameters ​

ParameterType
props{ editor: Editor; }
props.editorEditor

Returns ​

void


placeholder? ​

ts
optional placeholder?: string;

Defined in: packages/react/src/components/Vizel.tsx:42

Placeholder text when editor is empty


showBubbleMenu? ​

ts
optional showBubbleMenu?: boolean;

Defined in: packages/react/src/components/Vizel.tsx:71

Whether to show the bubble menu (default: true)


showToolbar? ​

ts
optional showToolbar?: boolean;

Defined in: packages/react/src/components/Vizel.tsx:62

Whether to show the toolbar (default: false)


toolbarContent? ​

ts
optional toolbarContent?: (props) => ReactNode;

Defined in: packages/react/src/components/Vizel.tsx:69

Custom toolbar content as a render prop. Receives the bound editor instance so the consumer can drive Tiptap commands from custom controls. Mirrors the Vue &lt;slot name="toolbar" :editor&gt; and the Svelte toolbar: Snippet&lt;[{ editor }]&gt;.

Parameters ​

ParameterType
props{ editor: Editor; }
props.editorEditor

Returns ​

ReactNode


transformDiagramsOnImport? ​

ts
optional transformDiagramsOnImport?: boolean;

Defined in: packages/react/src/components/Vizel.tsx:40

Automatically transform diagram code blocks (mermaid, graphviz) to diagram nodes when importing markdown content. Only applies when initialMarkdown is provided.

Default ​

ts
true

Released under the MIT License.