context: function enableDesignMode(rte, html, css, readOnly) {	var frameHtml = "<html id=\"" + rte + "\"><head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n";	if(css.length > 0){		frameHtml += "<link media=\"all\" type=\"text/css\" href=\"" + css + "\" rel=\"stylesheet\">\n";	}	frameHtml += "</head><body>\n"+html+"\n</body></html>";  	var oRTE = returnRTE(rte).document;	if(document.all){		oRTE.open();		oRTE.write(frameHtml);		oRTE.close();	 	if(!readOnly){			oRTE.designMode = "On";		}	}	else{		originalHTMLDesign = oRTE.body.style;		try{			// Commented out the following line to confront a bug when loading multiple RTEs on one page in a MOZ browser			// Fix provided by "Kings". Safari may have problems with this snytax - unable to test because I don't own a MAC.(Tim Bell)			//			// if(!readOnly) document.getElementById(rte).contentDocument.designMode = "on";			if(!readOnly) {				addLoadEvent(function() { document.getElementById(rte).contentDocument.designMode = "on"; });	  		}   			try{				oRTE.open();				oRTE.write(frameHtml);				oRTE.close();				if(isGecko && !readOnly){				  //attach a keyboard handler for gecko browsers to make keyboard shortcuts work				  oRTE.addEventListener("keypress", geckoKeyPress, true);				  oRTE.addEventListener("focus", function (){dlgCleanUp()}, false);				}		  	}catch(e){				alert(lblErrorPreload);			}		}catch(e){			//gecko may take some time to enable design mode.			//Keep looping until able to set.			if(isGecko){				setTimeout("enableDesignMode('"+rte+"', '"+html+"', '"+css+"', "+readOnly+");", 200);			}			else{				return false;			}		}	}	setTimeout('showGuidelines("'+rte+'")',300);}
meta: 9569	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9569/c01175fafd13b057fe989bcc3baea35c26c23f0d/richtext.js/clean/viscacha/templates/editor/richtext.js