Sha256: 880b9ff3d8121f8331a8c159d117542ee2fd5a587de7a645fcce06ae296ce463

Contents?: true

Size: 1.57 KB

Versions: 1

Compression:

Stored size: 1.57 KB

Contents

/*!
 * froala_editor v1.2.6 (http://editor.froala.com)
 * License http://editor.froala.com/license
 * Copyright 2014-2015 Froala Labs
 */
!function(a){a.Editable.DEFAULTS=a.extend(a.Editable.DEFAULTS,{fontList:{"Arial,Helvetica":"Arial, Helvetica","Courier,Courier New":"Courier, Courier New",Georgia:"Georgia","Times New Roman,Times":"Times New Roman,Times","Trebuchet MS":"Trebuchet MS","Verdana, Geneva":"Verdana,Geneva"}}),a.Editable.prototype.refreshFontFamily=function(){var b=a(this.getSelectionElement());this.$editor.find('.fr-dropdown > button[data-name="fontFamily"] + ul li').removeClass("active"),this.$editor.find('.fr-dropdown > button[data-name="fontFamily"] + ul li[data-val="'+b.css("font-family").replace(/"/gi,'\\"')+'"]').addClass("active")},a.Editable.commands=a.extend(a.Editable.commands,{fontFamily:{title:"Font Family",icon:"fa fa-font",refreshOnShow:a.Editable.prototype.refreshFontFamily,callback:function(a,b){this.inlineStyle("font-family",a,b)},undo:!0,callbackWithoutSelection:function(a,b){this._startInFontExec("font-family",a,b)}}}),a.Editable.prototype.command_dispatcher=a.extend(a.Editable.prototype.command_dispatcher,{fontFamily:function(a){var b=this.buildDropdownFontFamily(),c=this.buildDropdownButton(a,b,"fr-family");return c}}),a.Editable.prototype.buildDropdownFontFamily=function(){var a='<ul class="fr-dropdown-menu">';for(var b in this.options.fontList){var c=this.options.fontList[b],d='<li data-cmd="fontFamily" data-val="'+b+'">';d+='<a href="#" data-text="true" title="'+c+'" style="font-family: '+b+';">'+c+"</a></li>",a+=d}return a+="</ul>"}}(jQuery);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wysiwyg-rails-1.2.6 app/assets/javascripts/plugins/font_family.min.js