add:  var sel = this._getSelection(); var rangeCheck = this._createRange(sel); var node = rangeCheck.startContainer;  if (node.tagName == 'HTML') { node = node.firstChild;   if (node.tagName == 'HEAD') { node = node.nextSibling; }   if (node.tagName == 'BODY') { range.setEnd(node, 0); range.setStart(node, 0); } else { return false; } }  
context: HTMLArea.prototype.insertHTML = function(html, range) {	if (range == null) {		var sel = this._getSelection();		var range = this._createRange(sel);		var node = range.startContainer;		if (!HTMLArea.is_ie) {			if (node.tagName == 'HTML') {				return false;			}		}	}	if (HTMLArea.is_ie) {		range.pasteHTML(html);	} else {		// construct a new document fragment with the given HTML		var fragment = this._doc.createDocumentFragment();		var div = this._doc.createElement("div");		div.innerHTML = html;		while (div.firstChild) {			// the following call also removes the node from div			fragment.appendChild(div.firstChild);		}		// this also removes the selection		var node = this.insertNodeAtSelection(fragment, range);	}};
meta: 5635	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5635/ce8c3393d6958c65678b2d1d647fb785bea8d7c3/core.js/clean/fudge/wysiwyg/core/core.js