QuillToolbarButton

QuillToolbarButton

Class representing a button tool for a Quill Editor toolbar.

Constructor

new QuillToolbarButton(optionsopt)

Creates an instance of QuillToolbarButton.
Source:
Parameters:
Name Type Attributes Description
options object <optional>
The options/settings for this QuillToolbarButton.
Name Type Attributes Default Description
id string <optional>
`button-${random10digitNumber}` The id of the quill tool.
value string <optional>
The default hidden value of the button.
icon string The default icon this button tool will have.

Methods

getValue(newLabel)

Set the hidden value of this button tool.
Source:
Parameters:
Name Type Description
newLabel string The or html tag to use as an icon. (Make sure it's 18x18 in size.)

onClick(quill)

A callback that gets called automatically when the button is clicked, tapped or triggered witht he keyboard etc. This callback is expected to be overwritten.
Source:
Parameters:
Name Type Description
quill Quill The quill instance the dropdown tool is attached to.

setIcon(newLabel)

Set the icon for this button tool.
Source:
Parameters:
Name Type Description
newLabel string The or html tag to use as an icon. (Make sure it's 18x18 in size.)

setValue(newLabel)

Set the hidden value of this button tool.
Source:
Parameters:
Name Type Description
newLabel string The or html tag to use as an icon. (Make sure it's 18x18 in size.)