@mermaid-editor-sdk/headless / setERAttribute
Function: setERAttribute()
setERAttribute(
source,entity,attribute,patch):string
Defined in: source/er-mutations.ts:452
Updates one ER attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
source | string | Mermaid source to inspect or update. |
entity | string | Entity identifier. |
attribute | Pick<ERAttribute, "name" | "occurrence"> | Attribute to add or identify. |
patch | Partial<Pick<ERAttribute, "type" | "name" | "key" | "comment">> | Properties to apply to the element. |
Returns
string