style.setNodeTag
setNodeTag(nodeId: string, tag: string | TagSpec): voidConvenience method: assign a tag to a single node by spec, id, or null to clear.
TagSpec— creates a new tag then assigns it.TagId(string) — assigns an existing tag by id.null— removes any existing tag from the node.
Undoable.
nodeId | string | Target node identifier. |
tag | string | TagSpec | Tag spec, tag id, or null to clear. |
Returns: void