Vizel API / core/src / convertVizelCodeBlocksToDiagrams
Function: convertVizelCodeBlocksToDiagrams()
ts
function convertVizelCodeBlocksToDiagrams(editor): void;Defined in: packages/core/src/utils/editorHelpers.ts:348
Convert all diagram code blocks in a document to diagram nodes. This command should be called after importing markdown content. Supports mermaid, dot, and graphviz code blocks.
Parameters
| Parameter | Type | Description |
|---|---|---|
editor | Editor | The editor instance |
Returns
void
Example
typescript
editor.commands.setContent(markdownText, { contentType: 'markdown' });
convertVizelCodeBlocksToDiagrams(editor);