Sha256: b5c4518fcfd49f35e8d5dbafaad8d812c265091ba0e82bbbaedc327efd167c76
Contents?: true
Size: 1.83 KB
Versions: 1
Compression:
Stored size: 1.83 KB
Contents
/*! * froala_editor v2.9.8 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2020 Froala Labs */ !function(n){"function"==typeof define&&define.amd?define(["jquery"],n):"object"==typeof module&&module.exports?module.exports=function(e,t){return t===undefined&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t)}:n(window.jQuery)}(function(l){l.extend(l.FE.DEFAULTS,{lineHeights:{Default:"",Single:"1",1.15:"1.15",1.5:"1.5",Double:"2"}}),l.FE.PLUGINS.lineHeight=function(r){return{_init:function(){},apply:function(e){r.selection.save(),r.html.wrap(!0,!0,!0,!0),r.selection.restore();var t=r.selection.blocks();t.length&&l(t[0]).parent().is("td")&&r.format.applyStyle("line-height",e.toString()),r.selection.save();for(var n=0;n<t.length;n++)l(t[n]).css("line-height",e),""===l(t[n]).attr("style")&&l(t[n]).removeAttr("style");r.html.unwrap(),r.selection.restore()},refreshOnShow:function(e,t){var n=r.selection.blocks();if(n.length){var i=l(n[0]);t.find(".fr-command").each(function(){var e=l(this).data("param1"),t=0<=(i.attr("style")||"").indexOf("line-height: "+e+";");l(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}}},l.FE.RegisterCommand("lineHeight",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.lineHeights;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command '+n+'" tabIndex="-1" role="option" data-cmd="lineHeight" data-param1="'+t[n]+'" title="'+this.language.translate(n)+'">'+this.language.translate(n)+"</a></li>");return e+="</ul>"},title:"Line Height",callback:function(e,t){this.lineHeight.apply(t)},refreshOnShow:function(e,t){this.lineHeight.refreshOnShow(e,t)},plugin:"lineHeight"}),l.FE.DefineIcon("lineHeight",{NAME:"arrows-v",FA5NAME:"arrows-alt-v"})});
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wysiwyg-rails-2.9.8 | app/assets/javascripts/plugins/line_height.min.js |