Paste was working in previous versions of select2, taking tokenSeparator in account to split pasted term into multiple tags.
Now, I just can't get it running anymore.
Here's how I'm calling select2:
$('select').select2({
tags: true,
multiple: true,
tokenSeparators: [',', ' '],
width: 200
});
Example: http://codepen.io/anon/pen/oXoXqO . Try to paste: Gods,Angels,Devils
I also tried to use the tokenizer method, as described here: Auto tokenize last item in pasted string using select2, but got this error:
select2.js:3503 Uncaught TypeError: Cannot read property 'term' of undefined
This is a known issue at select2 4.0.0, reported here: https://github.com/select2/select2/issues/3458
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With