HTMLPin API Reference
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
:
Name | Type | Description |
---|---|---|
elementId | string | Required. Specifies the id of the HTML element that wrappers the elements where comments can be added. |
options | HTMLPinOptions | Optional. Specifies the settings for the adapter. |
Types Definition
HTMLPinOptions
Type: object
An object describing the configuration for the adapter.
Name | Type | Description |
---|---|---|
dataAttributeName | string | Use 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 . |
dataAttributeValueFilters | RegExp[] | 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)$/]
}