Select2 - populate with dynamic tags

How to populate select2 with dynamically created tags?
I’m following this instruction:

I have dynamic tags being created when user types text into input by hand.
I would like to set some default tags when page is loaded with code.


<select id="tagiField"
class="js-states form-control js-example-basic-multiple js-example-tags js-example-responsive" 
style="width: 100%">

Seems like a basic thing, but I failed. Any help appeciated.