/*! * froala_editor v1.1.6 (http://editor.froala.com) * Copyright 2014-2014 Froala */ $.Editable.COLORS=["#000000","#444444","#666666","#999999","#CCCCCC","#EEEEEE","#F3F3F3","#FFFFFF","#FF0000","#FF9900","#FFFF00","#00FF00","#00FFFF","#0000FF","#9900FF","#FF00FF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#CFE2F3","#D9D2E9","#EAD1DC","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#9FC5E8","#B4A7D6","#D5A6BD","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6FA8DC","#8E7CC3","#C27BA0","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3D85C6","#674EA7","#A64D79","#990000","#B45F06","#BF9000","#38771D","#134F5C","#0B5394","#351C75","#741B47","#660000","#783F04","#7F6000","#274E13","#0C343D","#073763","#201211","#4C1130"],$.Editable.commands=$.extend($.Editable.commands,{color:{icon:"fa fa-tint",title:"Color",seed:[{cmd:"backColor",value:$.Editable.COLORS,title:"Background Color"},{cmd:"foreColor",value:$.Editable.COLORS,title:"Text Color"}]}}),$.Editable.prototype.execCommand=$.extend($.Editable.prototype.execCommand,{backColor:function(a,b){this.backColor(b)},foreColor:function(a,b){this.foreColor(b)}}),$.Editable.prototype.command_dispatcher=$.extend($.Editable.prototype.command_dispatcher,{color:function(a){var b=this.buildDropdownColor(a),c=this.buildDropdownButton(a,b,"fr-color-picker");this.$bttn_wrapper.append(c),this.registerRefreshEvent("backColor",function(a){this.refreshBackColor(a)}),this.registerRefreshEvent("foreColor",function(a){this.refreshForeColor(a)})}}),$.Editable.prototype.buildDropdownColor=function(a){for(var b='
",b+=e}return b+=""},$.Editable.prototype.backColor=function(a){var b="backColor";this.browser.msie||(b="hiliteColor");var c=$(this.getSelectionElement()).css("background-color");document.execCommand(b,!1,a);var d=this.$editor.find('button.fr-color-bttn[data-cmd="backColor"][data-val="'+a+'"]');d.addClass("active"),d.siblings().removeClass("active"),this.callback("backColor",[$.Editable.hexToRGBString(a),c])},$.Editable.prototype.foreColor=function(a){var b=$(this.getSelectionElement()).css("color");document.execCommand("foreColor",!1,a),this.saveSelectionByMarkers(),this.$element.find("font[color]").each(function(b,c){$(c).replaceWith($("").css("color",a).html($(c).html()))}),this.restoreSelectionByMarkers();var c=this.$editor.find('button.fr-color-bttn[data-cmd="foreColor"][data-val="'+a+'"]');c.addClass("active"),c.siblings().removeClass("active"),this.callback("foreColor",[$.Editable.hexToRGBString(a),b])};