code: function (items, index, before) {
          var self = this, curItems, beforeItems, afterItems;
  
          items = self.create(items);
          curItems = self.items();
  
          if (!before && index < curItems.length - 1) {
            index += 1;
          }
  
          if (index >= 0 && index < curItems.length) {
            beforeItems = curItems.slice(0, index).toArray();
            afterItems = curItems.slice(index).toArray();
            curItems.set(beforeItems.concat(items, afterItems));
          }
  
          return self.renderNew();
        }
docs: Inserts an control at a specific index.
  
  @method insert
  @param {Array/tinymce.ui.Collection} items Array if controls to insert.
  @param {Number} index Index to insert controls at.
  @param {Boolean} [before=false] Inserts controls before the index.