title: Select2 in Knockout.Js with custom template
body: <p>I want to use select2 in knockout.js</p>
  
  <p>for this i have a bindinghandler.</p>
  
  <pre><code>ko.bindingHandlers.select2 = {
      init: function(element, valueAccessor, allBindingsAccessor) {
          var obj = valueAccessor(),
              allBindings = allBindingsAccessor(),
              lookupKey = allBindings.lookupKey;
          $(element).select2(obj);
          if (lookupKey) {
              var value = ko.utils.unwrapObservable(allBindings.value);
              $(element).select2('data', ko.utils.arrayFirst(obj.data.results, function(item) {
                  return item[lookupKey] === value;
              }));
          }
  
          ko.utils.domNodeDisposal.addDisposeCallback(element, function() {
              $(element).select2('destroy');
          });
      },
      update: function(element) {
          $(element).trigger('change');
      }
  };
  </code></pre>
  
  <p>i use the handler like this:</p>
  
  <pre><code> &lt;select id="itemselector" data-bind="options: items, optionsText: 'Name', OptionsValue:'Id', select2: {}"&gt;&lt;/select&gt;    
  </code></pre>
  
  <p>now to make custom templates i have to pass a format function to select2 like htis</p>
  
  <pre><code> function formatSelection(item) {
            return '&lt;b&gt;' + item.text + '&lt;/b&gt;';
          }
  </code></pre>
  
  <p>but i can't figure out how to do this with that binding handle. Can someone explain me how to pass the formatfunction or a string template to the binding handler, so that it will be applied to select?</p>