Vizel API / core/src / setVizelMarkdown
Function: setVizelMarkdown()
ts
function setVizelMarkdown(
editor,
markdown,
options?): boolean;Defined in: packages/core/src/utils/markdown.ts:48
Set markdown content to the editor.
Returns true if the operation succeeded, false only when the editor reference is missing. The Markdown extension is always-on, so no capability check is required.
Parameters
| Parameter | Type | Description |
|---|---|---|
editor | Editor | null | undefined | The editor instance |
markdown | string | The markdown content to set |
options | { onError?: (err) => void; transformDiagrams?: boolean; } | Options for setting content |
options.onError? | (err) => void | - |
options.transformDiagrams? | boolean | - |
Returns
boolean
Whether the markdown was applied to the editor