rem: doc.open(); var html = "<html>\n"; html += "<head>\n"; html += "<style>" + editor.config.pageStyle + "</style>\n"; html += "</head>\n"; html += "<body>\n"; html += editor._textArea.value; html += "</body>\n"; html += "</html>"; doc.write(html); doc.close(); 
add: if (!editor.config.fullPage) { doc.open(); var html = "<html>\n"; html += "<head>\n"; if (editor.config.baseURL) html += '<base href="' + editor.config.baseURL + '" />'; html += "<style> html,body { border: 0px; } " + editor.config.pageStyle + "</style>\n"; html += "</head>\n"; html += "<body>\n"; html += editor._textArea.value; html += "</body>\n"; html += "</html>"; doc.write(html); doc.close(); } else { var html = editor._textArea.value; if (html.match(HTMLArea.RE_doctype)) { editor.setDoctype(RegExp.$1); html = html.replace(HTMLArea.RE_doctype, ""); } doc.open(); doc.write(html); doc.close(); } 
context: 	function initIframe() {		var doc = editor._iframe.contentWindow.document;		if (!doc) {			// Try again..			// FIXME: don't know what else to do here.  Normally			// we'll never reach this point.			if (HTMLArea.is_gecko) {				setTimeout(initIframe, 10);				return false;			} else {				alert("ERROR: IFRAME can't be initialized.");			}		}		if (HTMLArea.is_gecko) {			// enable editable mode for Mozilla			doc.designMode = "on";		}		editor._doc = doc;		doc.open();		var html = "<html>\n";		html += "<head>\n";		html += "<style>" + editor.config.pageStyle + "</style>\n";		html += "</head>\n";		html += "<body>\n";		html += editor._textArea.value;		html += "</body>\n";		html += "</html>";		doc.write(html);		doc.close();		if (HTMLArea.is_ie) {			// enable editable mode for IE.	 For some reason this			// doesn't work if done in the same place as for Gecko			// (above).			doc.body.contentEditable = true;		}		editor.focusEditor();		// intercept some events; for updating the toolbar & keyboard handlers		HTMLArea._addEvents			(doc, ["keydown", "keypress", "mousedown", "mouseup", "drag"],			 function (event) {				 return editor._editorEvent(HTMLArea.is_ie ? editor._iframe.contentWindow.event : event);			 });		editor.updateToolbar();	};
meta: 6230	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6230/e9ff05661c4fa38c1e8ce4b72bf5b0a3bb5e0842/htmlarea.js/buggy/phpgwapi/js/htmlarea/htmlarea.js