Vizel API / core/src / parseVizelMarkdown
Function: parseVizelMarkdown()
ts
function parseVizelMarkdown(
editor,
markdown,
options?): JSONContent | null;Defined in: packages/core/src/utils/markdown.ts:80
Parse markdown to JSON content.
Returns null only when the editor reference is missing. The Markdown extension is always-on, so editor.markdown.parse is guaranteed to exist.
Parameters
| Parameter | Type | Description |
|---|---|---|
editor | Editor | null | undefined | The editor instance (needed for markdown extension access) |
markdown | string | The markdown content to parse |
options | { onError?: (err) => void; transformDiagrams?: boolean; } | Options for parsing |
options.onError? | (err) => void | - |
options.transformDiagrams? | boolean | - |
Returns
JSONContent | null
The parsed JSON content, or null if the editor is missing