rem: else if(drh.ie){ argument = '<'+argument+'>'; } 
add: else if(dojo.render.html.ie){ argument = '<'+argument+'>'; } 
context: 		execCommand: function (/*String*/command, argument){			// summary: Executes a command in the Rich Text area			// command: The command to execute			// argument: An optional argument to the command			var returnValue;			//focus() is required for IE (none-activeX mode) to work			//In addition, focus() makes sure after the execution of			//the command, the editor receives the focus as expected			this.focus();			command = this._normalizeCommand(command);			if (argument != undefined) {				if(command == "heading") { throw new Error("unimplemented"); }				else if(command == "formatblock"){					if(this.object){ //IE activeX mode						argument = this._native2LocalFormatNames[argument];					}					else if(drh.ie){ argument = '<'+argument+'>'; }				}			}			if(this.object){				switch (command) {					case "hilitecolor":						command = "setbackcolor";						break;					case "forecolor":					case "backcolor":					case "fontsize":					case "fontname":						command = "set" + command;						break;					case "formatblock":						command = "setblockformat";				}				if(command == "strikethrough"){					command = "inserthtml";					var range = this.document.selection.createRange();					if(!range.htmlText){						return;					}					argument=range.htmlText.strike();				}else if(command == "inserthorizontalrule"){					command = "inserthtml";					argument="<hr>";				}				if(command == "inserthtml"){					var range = this.document.selection.createRange();					if(this.document.selection.type.toUpperCase() == "CONTROL"){						//if selection is controlrange, no pasteHTML is available,						//we replace the outerHTML directly						for(var i=0;i<range.length;i++){							range.item(i).outerHTML = argument;						}					}else{						// on IE, we can use the pasteHTML method of the textRange object						// to get an undo-able innerHTML modification						range.pasteHTML(argument);						range.select();					}					returnValue = true;				}else if(arguments.length == 1){					returnValue = this.object.ExecCommand(this._activeX.command[command],						this._activeX.ui.noprompt);				}else{					returnValue = this.object.ExecCommand(this._activeX.command[command],						this._activeX.ui.noprompt, argument);				}			}else if(command == "inserthtml"){				if(dojo.render.html.ie){					//dojo.debug("inserthtml breaks the undo stack when not using the ActiveX version of the control!");					var insertRange = this.document.selection.createRange();					insertRange.pasteHTML(argument);					insertRange.select();					//insertRange.collapse(true);					return true;				}else{					return this.document.execCommand(command, false, argument);				}			/* */			// fix up unlink in Mozilla to unlink the link and not just the selection			}else if((command == "unlink")&&				(this.queryCommandEnabled("unlink"))&&				(dojo.render.html.mozilla)){				// grab selection				// Mozilla gets upset if we just store the range so we have to				// get the basic properties and recreate to save the selection				var selection = this.window.getSelection();				var selectionRange = selection.getRangeAt(0);				var selectionStartContainer = selectionRange.startContainer;				var selectionStartOffset = selectionRange.startOffset;				var selectionEndContainer = selectionRange.endContainer;				var selectionEndOffset = selectionRange.endOffset;				// select our link and unlink				var a = dojo.withGlobal(this.window, "getAncestorElement", dojo.html.selection, ['a']);				dojo.withGlobal(this.window, "selectElement", dojo.html.selection, [a]);				returnValue = this.document.execCommand("unlink", false, null);				// restore original selection				var selectionRange = this.document.createRange();				selectionRange.setStart(selectionStartContainer, selectionStartOffset);				selectionRange.setEnd(selectionEndContainer, selectionEndOffset);				selection.removeAllRanges();				selection.addRange(selectionRange);				return returnValue;			}else if((command == "hilitecolor")&&(dojo.render.html.mozilla)){				// mozilla doesn't support hilitecolor properly when useCSS is				// set to false (bugzilla #279330)				this.document.execCommand("useCSS", false, false);				returnValue = this.document.execCommand(command, false, argument);				this.document.execCommand("useCSS", false, true);			}else if((dojo.render.html.ie)&&( (command == "backcolor")||(command == "forecolor") )){				// Tested under IE 6 XP2, no problem here, comment out				// IE weirdly collapses ranges when we exec these commands, so prevent it//				var tr = this.document.selection.createRange();				argument = arguments.length > 1 ? argument : null;				returnValue = this.document.execCommand(command, false, argument);				// timeout is workaround for weird IE behavior were the text				// selection gets correctly re-created, but subsequent input				// apparently isn't bound to it//				setTimeout(function(){tr.select();}, 1);			}else{				// dojo.debug("command:", command, "arg:", argument);				argument = arguments.length > 1 ? argument : null;//				if(dojo.render.html.moz){//					this.document = this.iframe.contentWindow.document//				}				if(argument || command!="createlink") {					returnValue = this.document.execCommand(command, false, argument);				}			}			this.onDisplayChanged();			return returnValue;		},
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/RichText.js/buggy/www/resources/dojo-ajax/src/widget/RichText.js