{I" class:ETI"ProcessedAsset;FI"logical_path;TI"bootstrap-wysihtml5.js;FI" pathname;TI"b/Users/ben/Documents/benroesch.com/storytime/vendor/assets/javascripts/bootstrap-wysihtml5.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+˝ĂSI" length;Ti:\I" digest;TI"%8624bb6d03d54dfd37d18616e99d4315;FI" source;TI":\!function($, wysi) { "use strict"; var tpl = { "font-styles": function(locale, options) { var size = (options && options.size) ? ' btn-'+options.size : ''; return ""; }, "emphasis": function(locale, options) { var size = (options && options.size) ? ' btn-'+options.size : ''; return "
  • " + "
    " + "" + locale.emphasis.bold + "" + "" + locale.emphasis.italic + "" + "" + locale.emphasis.underline + "" + "
    " + "
  • "; }, "lists": function(locale, options) { var size = (options && options.size) ? ' btn-'+options.size : ''; return "
  • " + "
    " + "" + "" + "" + "" + "
    " + "
  • "; }, "link": function(locale, options) { var size = (options && options.size) ? ' btn-'+options.size : ''; return "
  • " + ""+ "" + "" + "
  • "; }, "image": function(locale, options) { var size = (options && options.size) ? ' btn-'+options.size : ''; return "
  • " + "" + "" + "
  • "; }, "html": function(locale, options) { var size = (options && options.size) ? ' btn-'+options.size : ''; return "
  • " + "
    " + "" + "
    " + "
  • "; }, "color": function(locale, options) { var size = (options && options.size) ? ' btn-'+options.size : ''; return ""; } }; var templates = function(key, locale, options) { return tpl[key](locale, options); }; var Wysihtml5 = function(el, options) { this.el = el; var toolbarOpts = options || defaultOptions; for(var t in toolbarOpts.customTemplates) { tpl[t] = toolbarOpts.customTemplates[t]; } this.toolbar = this.createToolbar(el, toolbarOpts); this.editor = this.createEditor(options); window.editor = this.editor; $('iframe.wysihtml5-sandbox').each(function(i, el){ $(el.contentWindow).off('focus.wysihtml5').on({ 'focus.wysihtml5' : function(){ $('li.dropdown').removeClass('open'); } }); }); }; Wysihtml5.prototype = { constructor: Wysihtml5, createEditor: function(options) { options = options || {}; // Add the toolbar to a clone of the options object so multiple instances // of the WYISYWG don't break because "toolbar" is already defined options = $.extend(true, {}, options); options.toolbar = this.toolbar[0]; var editor = new wysi.Editor(this.el[0], options); if(options && options.events) { for(var eventName in options.events) { editor.on(eventName, options.events[eventName]); } } return editor; }, createToolbar: function(el, options) { var self = this; var toolbar = $("