add: case "mceForeColor": var template = new Array(); var elm = tinyMCE.selectedInstance.getFocusElement(); var inputColor = tinyMCE.getAttrib(elm, "color");  if (inputColor == '') inputColor = elm.style.color;  if (!inputColor) inputColor = "#000000";  template['file'] = 'color_picker.htm'; template['width'] = 220; template['height'] = 190;  tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "forecolor", input_color : inputColor}); return true;  case "mceBackColor": var template = new Array(); var elm = tinyMCE.selectedInstance.getFocusElement(); var inputColor = elm.style.backgroundColor;  if (!inputColor) inputColor = "#000000";  template['file'] = 'color_picker.htm'; template['width'] = 220; template['height'] = 190;  template['width'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width', 0); template['height'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height', 0);  tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "HiliteColor", input_color : inputColor});  return true;  
context:     execCommand : function(editor_id, element, command, user_interface, value) {        switch (command) {            case "mceLink":                var inst = tinyMCE.getInstanceById(editor_id);				var doc = inst.getDoc();				var selectedText = "";				if (tinyMCE.isMSIE) {					var rng = doc.selection.createRange();					selectedText = rng.text;				} else					selectedText = inst.getSel().toString();				if (!tinyMCE.linkElement) {					if ((tinyMCE.selectedElement.nodeName.toLowerCase() != "img") && (selectedText.length <= 0))						return true;				}				var href = "", target = "", title = "", onclick = "", action = "insert", style_class = "";                var text = "";                if ((tinyMCE.selectedElement.nodeName.toLowerCase() != "img") && (selectedText.length > 0))                    text = selectedText;                if (tinyMCE.selectedElement.nodeName.toLowerCase() == "a")					tinyMCE.linkElement = tinyMCE.selectedElement;				// Is anchor not a link				if (tinyMCE.linkElement != null && tinyMCE.getAttrib(tinyMCE.linkElement, 'href') == "")					tinyMCE.linkElement = null;				if (tinyMCE.linkElement) {                    if (tinyMCE.isMSIE) {				    	text = tinyMCE.linkElement.innerHTML;				    } else                        text = tinyMCE.linkElement.text;                                        href = tinyMCE.getAttrib(tinyMCE.linkElement, 'href');                    target = tinyMCE.getAttrib(tinyMCE.linkElement, 'target');					title = tinyMCE.getAttrib(tinyMCE.linkElement, 'title');					onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');					style_class = tinyMCE.getAttrib(tinyMCE.linkElement, 'class');					// Try old onclick to if copy/pasted content					if (onclick == "")						onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');					onclick = tinyMCE.cleanupEventStr(onclick);					href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");					// Use mce_href if defined					mceRealHref = tinyMCE.getAttrib(tinyMCE.linkElement, 'mce_href');					if (mceRealHref != "") {						href = mceRealHref;						if (tinyMCE.getParam('convert_urls'))							href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");					}					action = "update";				}                var template = new Array();				template['file'] = 'link.htm';				template['width'] = 600;				template['height'] = 450;				// Language specific width and height addons				template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0);				template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0);				if (inst.settings['insertlink_callback']) {					var returnVal = eval(inst.settings['insertlink_callback'] + "(href, target, title, onclick, action, style_class);");					if (returnVal && returnVal['href'])						TinyMCE_WikieditorTheme._insertLink(returnVal['href'], returnVal['target'], returnVal['title'], returnVal['onclick'], returnVal['style_class']);				} else {					tinyMCE.openWindow(template, {editor_id : editor_id, action : action, text : text, href : href, target : target, title : title, onclick : onclick, action : action, className : style_class, inline : "yes", scrollbars : 'yes',  resizable : 'no', mce_windowresize: false});				}				return true;            default :                return wikiEditor.execCommand(editor_id, element, command, user_interface, value);        }    },
meta: 6184	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/99c4378ba78bef1f5ed4ec3e57a795da561a9024/editor_template.js/buggy/xwiki-platform-web/standard/src/main/webapp/tiny_mce_2/themes/wikieditor/editor_template.js