rem: if(fullscreen) { readOnly = false; buttons = true;  if(resize_fullsrcreen) window.onresize = resizeRTE; document.body.style.margin = "0px"; document.body.style.overflow = "hidden";  findSize(""); width = obj_width; if(width < iconWrapWidth) { height = (obj_height - 83); } else{ height = (obj_height - 55); } if (width < minWidth){ document.body.style.overflow = "auto"; if(isIE){ height = obj_height-22; } else{ height = obj_height-24; } width = minWidth; } 
add: iconWrapWidth = iconWrapWidth-25;  if (buttons && (width < minWidth)) width = minWidth; if(isIE){ 
context: function writeRichText(rte, html, css, width, height, buttons, readOnly, fullscreen) {	if(isRichText){		currentRTE = rte;		if(allRTEs.length > 0) allRTEs += ";";		allRTEs += rte;		// CM 06/04/05 stops single quotes from messing everything up		html=replaceIt(html,'\'','&apos;');		// CM 05/04/05 a bit of juggling for compatibility with old RTE implementations		if (arguments.length == 6) {			fullscreen = false;			readOnly = buttons;			buttons = height;			height = width;			width = css;			css = "";		}		var iconWrapWidth = wrapWidth;		if(readOnly) buttons = false;		if(fullscreen) {			readOnly = false; // fullscreen is not readOnly and must show buttons			buttons = true;			// resize rte on resize if the option resize_fullsrcreen = true.			if(resize_fullsrcreen) window.onresize = resizeRTE;			document.body.style.margin = "0px";			document.body.style.overflow = "hidden";	  		//adjust maximum table widths			findSize("");			width = obj_width;	  		if(width < iconWrapWidth) {				height = (obj_height - 83);	  		}	  		else{		  		height = (obj_height - 55);			}			if (width < minWidth){		  		document.body.style.overflow = "auto";		  		if(isIE){					height = obj_height-22;		  		}		  		else{					height = obj_height-24;				}		 		width = minWidth;			}			var tablewidth = width;		}		else{			fullscreen = false;			iconWrapWidth = iconWrapWidth-25;			//adjust minimum table widths			if (buttons && (width < minWidth)) width = minWidth;			if(isIE){				var tablewidth = width;			}			else{				var tablewidth = width + 4;		  	}	  	}		var rte_css = "";		if(css.length > 0) {			rte_css = css;		}		else{	  		rte_css = cssFile;		}		document.writeln('<span class="rteDiv">');		if(buttons) {			document.writeln('<table class="rteBk" cellpadding="0" cellspacing="0" id="Buttons1_'+rte+'" width="' + tablewidth + '">');			document.writeln('<tbody><tr>');				insertBar();			document.writeln('<td><select id="formatblock_'+rte+'" onchange="selectFont(\''+rte+'\', this.id);" style="font-size:14px;width:105px;height:20px;margin:1px;">');			document.writeln(lblFormat);			document.writeln('</select></td><td>');			document.writeln('<select id="fontname_'+rte+'" onchange="selectFont(\''+rte+'\', this.id)" style="font-size:14px;width:125px;height:20px;margin:1px;">');			document.writeln(lblFont);			document.writeln('</select></td><td>');			document.writeln('<select unselectable="on" id="fontsize_'+rte+'" onchange="selectFont(\''+rte+'\', this.id);" style="font-size:14px;width:75px;height:20px;margin:1px;">');			document.writeln(lblSize);			document.writeln('</select>');				insertSep();			if(isIE){				insertImg(lblCut,"cut.gif","rteCommand('"+rte+"','cut')");				insertImg(lblCopy,"copy.gif","rteCommand('"+rte+"','copy')");				insertImg(lblPaste,"paste.gif","rteCommand('"+rte+"','paste')");			}			insertImg(lblPasteText,"pastetext.gif","dlgLaunch('"+rte+"','text')");			insertImg(lblPasteWord,"pasteword.gif","dlgLaunch('"+rte+"','word')");				insertSep();			insertImg(lblUndo,"undo.gif","rteCommand('"+rte+"','undo')");			insertImg(lblRedo,"redo.gif","rteCommand('"+rte+"','redo')");				insertSep();			insertImg(lblSelectAll,"selectall.gif","toggleSelection('"+rte+"')");			insertImg(lblUnformat,"unformat.gif","rteCommand('"+rte+"','removeformat')");				insertSep();			insertImg(lblSearch,"replace.gif","dlgLaunch('"+rte+"','replace')");			insertImg(lblWordCount,"word_count.gif","countWords('"+rte+"')");			if(isIE)insertImg(lblSpellCheck,"spellcheck.gif","checkspell()");	   		document.writeln('</td>');			if(tablewidth < iconWrapWidth){				document.writeln('<td width="100%"></td></tr></tbody></table>');				document.writeln('<table class="rteBk" cellpadding="0" cellspacing="0" id="Buttons2_'+rte+'" width="' + tablewidth + '">');				document.writeln('<tbody><tr>');			}				insertBar();			insertImg(lblBold,"bold.gif","rteCommand('"+rte+"','bold')");			insertImg(lblItalic,"italic.gif","rteCommand('"+rte+"','italic')");			insertImg(lblUnderline,"underline.gif","rteCommand('"+rte+"','underline')");				insertSep();			insertImg(lblStrikeThrough,"strikethrough.gif","rteCommand('"+rte+"','strikethrough')");			insertImg(lblSuperscript,"superscript.gif","rteCommand('"+rte+"','superscript')");			insertImg(lblSubscript,"subscript.gif","rteCommand('"+rte+"','subscript')");	  			insertSep();			insertImg(lblAlgnLeft,"left_just.gif","rteCommand('"+rte+"','justifyleft')");			insertImg(lblAlgnCenter,"centre.gif","rteCommand('"+rte+"','justifcenter')");			insertImg(lblAlgnRight,"right_just.gif","rteCommand('"+rte+"','justifyright')");			insertImg(lblJustifyFull,"justifyfull.gif","rteCommand('"+rte+"','justifyfull')");				insertSep();			insertImg(lblOL,"numbered_list.gif","rteCommand('"+rte+"','insertorderedlist')");			insertImg(lblUL,"list.gif","rteCommand('"+rte+"','insertunorderedlist')");			insertImg(lblOutdent,"outdent.gif","rteCommand('"+rte+"','outdent')");			insertImg(lblIndent,"indent.gif","rteCommand('"+rte+"','indent')");				insertSep();			insertImg(lblTextColor,"textcolor.gif","dlgColorPalette('"+rte+"','forecolor')","forecolor_"+rte);			insertImg(lblBgColor,"bgcolor.gif","dlgColorPalette('"+rte+"','hilitecolor')","hilitecolor_"+rte);				insertSep();			insertImg(lblHR,"hr.gif","rteCommand('"+rte+"','inserthorizontalrule')");				insertSep();			insertImg(lblInsertChar,"special_char.gif","dlgLaunch('"+rte+"','char')");			insertImg(lblInsertLink,"hyperlink.gif","dlgLaunch('"+rte+"','link')");			insertImg(lblAddImage,"image.gif","dlgLaunch('"+rte+"','image')");			insertImg(lblInsertTable,"insert_table.gif","dlgLaunch('"+rte+"','table')");			document.writeln('<td width="100%"></td></tr></tbody></table>');		}		document.writeln('<iframe id="'+rte+'" frameborder="0" style="border: 1px solid #d2d2d2; width: ' + (tablewidth - 2) + 'px; height: ' + height + 'px;" src="' + includesPath + 'blank.htm" onfocus="dlgCleanUp();"></iframe>');		if(!readOnly){		  	document.writeln('<table id="vs'+rte+'" name="vs'+rte+'" class="rteBk" cellpadding=0 cellspacing=0 border=0 width="' + tablewidth + '"><tr>');			document.writeln('<td onclick="toggleHTMLSrc(\''+rte+'\', ' + buttons + ');" nowrap="nowrap"><img class="rteBar" src="'+imagesPath+'bar.gif" alt="" align=absmiddle><span id="imgSrc'+rte+'"><img src="'+imagesPath+'code.gif" alt="" title="" style="margin:1px;" align=absmiddle></span><span id="txtSrc'+rte+'" style="font-family:sans-serif;font-size:12px;color:#555555;CURSOR: default;">'+lblModeHTML+'</span></td>');			document.writeln('<td width="100%" nowrap>&nbsp;</td></tr></table>');		}		document.writeln('<iframe width="142" height="98" id="cp'+rte+'" src="' + includesPath + 'palette.htm" scrolling="no" frameborder=0 style="margin:0;border:0;visibility:hidden;position:absolute;border:1px solid #cdcdcd;top:-1000px;left:-1000px"></iframe>');		document.writeln('<input type="hidden" id="hdn'+rte+'" name="'+rte+'" value="" style="position: absolute;left:-1000px;top:-1000px;">');		if(!fullscreen) document.writeln('<input type="hidden" id="size'+rte+'" name="size'+rte+'" value="'+height+'" style="position: absolute;left:-1000px;top:-1000px;">');		document.writeln('</span>');		document.getElementById('hdn'+rte).value = html;		enableDesignMode(rte, html, rte_css, readOnly);	}}
meta: 9569	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9569/c01175fafd13b057fe989bcc3baea35c26c23f0d/richtext.js/clean/viscacha/templates/editor/richtext.js