code: function templateSelector(trumbowyg) {
          var available = trumbowyg.o.plugins.templates;
          var templates = [];
  
          $.each(available, function (index, template) {
              trumbowyg.addBtnDef('template_' + index, {
                  fn: function () {
                      trumbowyg.html(template.html);
                  },
                  hasIcon: false,
                  title: template.name
              });
              templates.push('template_' + index);
          });
  
          return templates;
      }
docs: Creates the template-selector dropdown.