Use input type text and assign select2 to it. how
<input type="text" id="makeTokens" />
and then in javascript
$("#makeTokens").select2({ placeholder: "Paste data", tags: ["red", "green", "blue"], tokenSeparators: [",", " "] });
in tags, you can assign any values ββthat you want to display as selection options, and use tokenSeperators to separate text into a comma or spaces, etc.
Note. The resulting input value will mean tokens, separated by a comma.
source share