@mermaid-editor-sdk/headless


@mermaid-editor-sdk/headless / addFlowchartNodeToSubgraph

Function: addFlowchartNodeToSubgraph()

addFlowchartNodeToSubgraph(source, subgraphId, id, label, shape?): string

Defined in: source/flowchart-mutations.ts:465

Adds a node inside a flowchart subgraph.

Parameters

ParameterTypeDefault valueDescription
sourcestring—Mermaid source to inspect or update.
subgraphIdstring—Identifier of the subgraph that receives the node.
idstring—Identifier of the diagram element.
labelstring—Displayed label.
shape?FlowchartNodeShape'rect'Node shape.

Returns

string