//>>built
define("dijit/_editor/plugins/TextColor","require dojo/colors dojo/_base/declare dojo/_base/lang ../_Plugin ../../form/DropDownButton".split(" "),function(h,k,l,n,e,m){var f=l("dijit._editor.plugins.TextColor",e,{buttonClass:m,colorPicker:"dijit/ColorPalette",useDefaultCommand:!1,_initButton:function(){this.command=this.name;this.inherited(arguments);var a=this;this.button.loadDropDown=function(d){function c(b){a.button.dropDown=new b({dir:a.editor.dir,ownerDocument:a.editor.ownerDocument,value:a.value,
onChange:function(g){a.editor.execCommand(a.command,g)},onExecute:function(){a.editor.execCommand(a.command,this.get("value"))}});d()}"string"==typeof a.colorPicker?h([a.colorPicker],c):c(a.colorPicker)}},updateState:function(){var a=this.editor,d=this.command;if(a&&a.isLoaded&&d.length){if(this.button){var c=this.get("disabled");this.button.set("disabled",c);if(c)return;try{var b=a.queryCommandValue(d)||""}catch(g){b=""}}""==b&&(b="#000000");"transparent"==b&&(b="#ffffff");"string"==typeof b?-1<
b.indexOf("rgb")&&(b=k.fromRgb(b).toHex()):(b=((b&255)<<16|b&65280|(b&16711680)>>>16).toString(16),b="#000000".slice(0,7-b.length)+b);this.value=b;(a=this.button.dropDown)&&a.get&&b!==a.get("value")&&a.set("value",b,!1)}}});e.registry.foreColor=function(a){return new f(a)};e.registry.hiliteColor=function(a){return new f(a)};return f});