Skip to content

Vizel API / core/src / getVizelMarkdown

Function: getVizelMarkdown()

ts
function getVizelMarkdown(editor, _onError?): string;

Defined in: packages/core/src/utils/markdown.ts:28

Get markdown content from the editor.

The Markdown extension is always installed by Vizel, so editor.getMarkdown() is guaranteed to exist when the editor is non-null. Returns an empty string when the editor is missing.

Parameters

ParameterTypeDescription
editorEditor | null | undefinedThe editor instance
_onError?(err) => voidReserved for future use. The current implementation never reports recoverable errors from this path because the Markdown extension is always-on; the parameter is kept for API symmetry with the parse / set helpers below.

Returns

string

Released under the MIT License.