Skip to main content

Home > @jsplumbtoolkit/browser-ui-vanilla-2 > CustomTagDefinition

CustomTagDefinition interface

Custom tags let you define your own tags and attach behaviour to them.

Signature:

export interface CustomTagDefinition 

Properties

PropertyModifiersTypeDescription
remove?boolean(Optional) If set to true, the element rendered for this tag is removed from the DOM. The Toolkit uses this capability internally to add endpoints to the DOM.
rendered(el: Element, data: any, instance: Recado, surface: Surface, vertex: Vertex) => anyThis function is called whenever the tag is encountered during rendering. el is the root element for a fragment rendered using the definition's template. Note that at the time this is called, el is not yet in the DOM.
templatestringTemplate for the tag. Must have a single root element.
updated(el: Element, data: any, instance: Recado, surface: Surface, vertex: Vertex) => anyThis function is called whenever the tag is updated during an update call.