@mermaid-editor-sdk/headless / addStatePaletteItem
Function: addStatePaletteItem()
addStatePaletteItem(
source,item,stateId?,label?):string
Defined in: source/state-mutations.ts:395
Adds a state palette item to the source.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
source | string | — | Mermaid source to inspect or update. |
item | StatePaletteItemId | — | Identifier of the palette item to add. |
stateId? | string | undefined | Optional state identifier used by the palette item. |
label? | string | '' | Displayed label. |
Returns
string