/* jce - 2.6.6 | 2017-01-02 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2017 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
!function(){tinymce.DOM,tinymce.dom.Event,tinymce.extend,tinymce.each,tinymce.explode;tinymce.create("tinymce.plugins.FontColorPlugin",{init:function(ed,url){this.editor=ed,ed.onNodeChange.add(function(ed,cm,n){function updateColor(controlId,color){(c=cm.get(controlId))&&(color||(color=s.default_color),color!==c.value&&c.displayColor(color))}var c,s=ed.settings;s.theme_advanced_show_current_color&&(updateColor("forecolor",n.style.color),updateColor("backcolor",n.style.backgroundColor))})},createControl:function(n,cf){switch(n){case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}},_createForeColorMenu:function(){var c,v,self=this,ed=self.editor,s=ed.settings,o={};return o.more_colors_func=function(){ed.execCommand("mceColorPicker",!1,{color:c.value,func:function(co){c.setColor(co)}})},(v=s.theme_advanced_text_colors)&&(o.colors=v),o.default_color=s.fontcolor_foreground_color||"#000000",o.title="advanced.forecolor_desc",o.cmd="ForeColor",o.scope=this,c=ed.controlManager.createColorSplitButton("forecolor",o)},_createBackColorMenu:function(){var c,v,self=this,ed=self.editor,s=ed.settings,o={};return o.more_colors_func=function(){ed.execCommand("mceColorPicker",!1,{color:c.value,func:function(co){c.setColor(co)}})},(v=s.theme_advanced_background_colors)&&(o.colors=v),o.default_color=s.fontcolor_background_color||"#FFFF00",o.title="advanced.backcolor_desc",o.cmd="HiliteColor",o.scope=this,c=ed.controlManager.createColorSplitButton("backcolor",o)}}),tinymce.PluginManager.add("fontcolor",tinymce.plugins.FontColorPlugin)}();