@mermaid-editor-sdk/headless


@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

ParameterTypeDescription
sourcestringMermaid source to inspect or update.
entitystringEntity identifier.
attributePick<ERAttribute, "name" | "occurrence">Attribute to add or identify.
patchPartial<Pick<ERAttribute, "type" | "name" | "key" | "comment">>Properties to apply to the element.

Returns

string