Interface CustomPaletteButtonTemplate

Describes a custom palette button. Custom palette buttons not restricted to activating built-in commands when clicked. A custom button template must minimally specify a label. In addition, an onUse handler function should be specified to perform the desired action when then button is clicked. All other properties are optional.

see

PaletteButtonTemplate

Hierarchy

  • CustomPaletteButtonTemplate

Index

Properties

Optional id

id: string

An optional ID that will be passed to onAdd and onUse. Does not affect the id attribute of the button.

label

label: string

The label text for the button. The text is sanitized for security before use so it can accept end user strings. An HTML button label can be set in onAdd if desired.

Optional onAdd

An optional listener function called when the button is created.

Optional onUse

An optional listener function called when the button is clicked. If none is specified, the button will have no effect.

Optional spokenLabel

spokenLabel: string

An optional spoken label used with screen readers.

Optional tooltip

tooltip: string

Optional additional details that may be displayed about the button.

This API is still under development and is subject to change. Copyright © Math I Can Do Solutions Incorporated and/or its licensors.