Tokenizer

A bootstrap JavaScript plugin (with semicolons) to provide a tokenizer input field.

Example

Start typing in the field below and just hit space, enter or comma to create a new token.

Usage

Via data attributes

<input type="text" data-provide="tokenizer">

Via JavaScript

$("input").tokenizer()

Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-offset="".

Name type default description
separator string ',' The character to use for separating the input values.
delimiters array [13,32,188] The key code(s) that trigger a new token.

Methods

.tokenizer(options)

Initializes an input with a tokenizer.