Sha256: 3dd131d90b1039b06861eda2fe3aad644d4fcfba399d322aff7e50e5c59deece

Contents?: true

Size: 1.74 KB

Versions: 1

Compression:

Stored size: 1.74 KB

Contents

/*!
 * froala_editor v2.9.5 (https://www.froala.com/wysiwyg-editor)
 * License https://froala.com/wysiwyg-editor/terms/
 * Copyright 2014-2019 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(o){o.extend(o.FE.DEFAULTS,{lineHeights:{Default:"",Single:"1",1.15:"1.15",1.5:"1.5",Double:"2"}}),o.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();r.selection.save();for(var n=0;n<t.length;n++)o(t[n]).css("line-height",e),""===o(t[n]).attr("style")&&o(t[n]).removeAttr("style");r.html.unwrap(),r.selection.restore()},refreshOnShow:function(e,t){var n=r.selection.blocks();if(n.length){var i=o(n[0]);t.find(".fr-command").each(function(){var e=o(this).data("param1"),t=0<=(i.attr("style")||"").indexOf("line-height: "+e+";");o(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}}},o.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"}),o.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.5 app/assets/javascripts/plugins/line_height.min.js