Takes a tag input as argument and returns a transformed value Object consisting of functions which return template strings any other value than 1 or 2 will disable editing Number of clicks on a tag to enter "edit" mode. when reached, adds a class "hasMaxTags" to Tries to autocomplete the input's value while typing (match from whitelist)Īn array of tags which only they are allowedĪutomatically adds the text which was inputed as a tag when blur event happensĮxposed callbacks object to be triggered on events: 'add' / 'remove' tags Should ONLY use tags allowed in whitelist Everything between these will become a tag The 'pattern' setting must be set to some character. Use select for single-value dropdown-like select box. Validate input by REGEX pattern (can also be applied on the input itself as an attribute) Ex: // If this attribute is set on an input/textarea element it will override this setting Suggestions dropdown item selected (by mouse/keyboard/touch) Suggestions dropdown has been removed from the DOM The dropdown DOM node is passed in the callback, see demo. Exposes the tag element, its index & data e.detail exposes value, inputElm & isValidĬlicking a tag. Input event, when a tag is being typed/edited. Returns the index of a specific tag, by valueĬonverts a String argument ( ] and ] are.) into HTML with mixed tags & textsĪ tag has been added but did not pass vaildation. This method gets called automatically when instansiating Tagify. When nothing passed, removes last tag (see source code)Ĭonverts the input's value into tags. Argument is the tag DOM element to be removed, or value. Removes all tags and resets the original input tag's value propertyĪccepts a String (word, single or multiple with a delimiter), an Array of Objects (see above) or Strings Reverts the input element back as it was before Tagify was applied
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |