Interface: RenderResult β
Defined in: packages/mermaid/src/types.ts:85
Properties β
bindFunctions()? β
optional
bindFunctions: (element
) =>void
Defined in: packages/mermaid/src/types.ts:103
Bind function to be called after the svg has been inserted into the DOM. This is necessary for adding event listeners to the elements in the svg.
js
const { svg, bindFunctions } = await mermaid.render('id1', 'graph TD;A-->B');
div.innerHTML = svg;
bindFunctions?.(div); // To call bindFunctions only if it's present.
Parameters β
element β
Element
Returns β
void
diagramType β
diagramType:
string
Defined in: packages/mermaid/src/types.ts:93
The diagram type, e.g. 'flowchart', 'sequence', etc.
svg β
svg:
string
Defined in: packages/mermaid/src/types.ts:89
The svg code for the rendered graph.