@mermaid-editor-sdk/headless / addERAttribute
Function: addERAttribute()
addERAttribute(
source,entity,attribute?):string
Defined in: source/er-mutations.ts:470
Adds an attribute to an ER entity.
Parameters
| Parameter | Type | Description |
|---|---|---|
source | string | Mermaid source to inspect or update. |
entity | string | Entity identifier. |
attribute? | Partial<Pick<ERAttribute, "type" | "name" | "key" | "comment">> | Attribute to add or identify. |
Returns
string