The main entity of Maskito core library is Maskito
class which accepts 2 arguments in constructor:
HTMLInputElement
or HTMLTextAreaElement
MaskitoOptions
The only available public method destroy
removes all created event listeners. Call it to clean everything up when the work is finished.
To understand the capabilities of the Maskito library, you need to learn about the following features and concepts:
Learn how to predefine your mask format via mask expression. This section describes different types of mask expression and explains meaning of "fixed character" term.
Learn about preprocessors and postprocessors.
Learn how you can augment masking with some custom logic bound to the masked HTML element.
Maskito can behave differently when user inserts new character in the middle of text field value. Learn how to control this behaviour via overwriteMode
parameter.
Learn how to correctly programmatically update element's value via maskitoTransform
.