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, 100);
				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;
		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>" + editor.config.pageStyle +
				" html,body {font-family:Arial;font-size:10pt; border: 0px; }</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();
		}

		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);
			 });

		// check if any plugins have registered refresh handlers
		for (var i in editor.plugins) {
			var plugin = editor.plugins[i].instance;
			if (typeof plugin.onGenerate == "function")
				plugin.onGenerate();
			if (typeof plugin.onGenerateOnce == "function") {
				plugin.onGenerateOnce();
				plugin.onGenerateOnce = null;
			}
		}

		setTimeout(function() {
			editor.updateToolbar();
		}, 250);

		if (typeof editor.onGenerate == "function")
			editor.onGenerate();
	}
// new frame.  Otherwise we get a stupid exception.
new frame.  Otherwise we get a stupid exception.
new frame . Otherwise we get a stupid exception .
function initIframe() {
		var doc = editor._iframe.contentWindow.document;
		if (!doc) {
			if (HTMLArea.is_gecko) {
				setTimeout(initIframe, 100);
				return false;
			} else {
				alert("ERROR: IFRAME can't be initialized.");
			}
		}
		if (HTMLArea.is_gecko) {
			doc.designMode = "on";
		}
		editor._doc = doc;
		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>" + editor.config.pageStyle +
				" html,body {font-family:Arial;font-size:10pt; border: 0px; }</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();
		}
		if (HTMLArea.is_ie) {
			doc.body.contentEditable = true;
		}
		HTMLArea._addEvents
			(doc, ["keydown", "keypress", "mousedown", "mouseup", "drag"],
			 function (event) {
				 return editor._editorEvent(HTMLArea.is_ie ? editor._iframe.contentWindow.event : event);
			 });
		for (var i in editor.plugins) {
			var plugin = editor.plugins[i].instance;
			if (typeof plugin.onGenerate == "function")
				plugin.onGenerate();
			if (typeof plugin.onGenerateOnce == "function") {
				plugin.onGenerateOnce();
				plugin.onGenerateOnce = null;
			}
		}
		setTimeout(function() {
			editor.updateToolbar();
		}, 250);
		if (typeof editor.onGenerate == "function")
			editor.onGenerate();
	}
function initIframe ( ) { var doc = editor . _iframe . contentWindow . document ; if ( ! doc ) { if ( HTMLArea . is_gecko ) { setTimeout ( initIframe , 100 ) ; return false ; } else { alert ( "ERROR: IFRAME can't be initialized." ) ; } } if ( HTMLArea . is_gecko ) { doc . designMode = "on" ; } editor . _doc = doc ; 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>" + editor . config . pageStyle + " html,body {font-family:Arial;font-size:10pt; border: 0px; }</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 ( ) ; } if ( HTMLArea . is_ie ) { doc . body . contentEditable = true ; } HTMLArea . _addEvents ( doc , [ "keydown" , "keypress" , "mousedown" , "mouseup" , "drag" ] , function ( event ) { return editor . _editorEvent ( HTMLArea . is_ie ? editor . _iframe . contentWindow . event : event ) ; } ) ; for ( var i in editor . plugins ) { var plugin = editor . plugins [ i ] . instance ; if ( typeof plugin . onGenerate == "function" ) plugin . onGenerate ( ) ; if ( typeof plugin . onGenerateOnce == "function" ) { plugin . onGenerateOnce ( ) ; plugin . onGenerateOnce = null ; } } setTimeout ( function ( ) { editor . updateToolbar ( ) ; } , 250 ) ; if ( typeof editor . onGenerate == "function" ) editor . onGenerate ( ) ; }
new frame.
new frame .
// Try again.. // FIXME: don't know what else to do here.  Normally // we'll never reach this point. // enable editable mode for Mozilla // enable editable mode for IE.	 For some reason this // doesn't work if done in the same place as for Gecko // (above). //editor.focusEditor(); // intercept some events; for updating the toolbar & keyboard handlers // check if any plugins have registered refresh handlers