Skip to main content

HTMLPin

HTMLPin is a PinAdapter for the Contextual Comments component.

How to use

To initialize the HTMLPin you can follow our quickstart guide.

Properties

See below the parameters to use in the constructor of the HTMLPin:

NameTypeDescription
elementIdstringRequired. Specifies the id of the HTML element that wrappers the elements where comments can be added.
optionsHTMLPinOptionsOptional. Specifies the settings for the adapter.

Types Definition

HTMLPinOptions

Type: object

An object describing the configuration for the adapter.

NameTypeDescription
dataAttributeNamestringUse this property to change the data attribute used to locate the elements that can receive a comment pin. The value of this attribute should be unique and persist on the page.
Default: data-superviz-id.
dataAttributeValueFiltersRegExp[]This Regex array is used to filter what elements should not be able to receive a comment pin.

Example:

{
dataAttributeName: "data-comment-id",
dataAttributeValueFilters: [/.*null-(target|source)$/]
}