rem: var textToEdit = ((directEditEnabled && !directEditViaChangeText) || isModal) ? document.frames['changeTextFrame'].document.forms[0].text.value : parent.opener.document.forms[0].text.value; 
add:  var textToEdit = theSavedCodeDiv.innerHTML ; 
context: function init() {	//alert(document.frames['changeTextFrame'].document.forms[0]);	document.getElementById("javascriptDisabled").style.display = "none";	var textToEdit = ((directEditEnabled && !directEditViaChangeText) || isModal) ? document.frames['changeTextFrame'].document.forms[0].text.value : parent.opener.document.forms[0].text.value;	/* fix links and other paths */	textToEdit = fixOnLoad(textToEdit);	/* mode */	if(textToEdit.indexOf('<') < 0 && textToEdit.indexOf('>') < 0){		//alert('TEXT');		editorDiv.innerText = textToEdit;	} else {		//alert('HTML');		editorDiv.innerHTML = textToEdit;	}	editorDiv.focus();	var tableNodeList = document.getElementsByTagName('table');	numberOfTables = tableNodeList.length;	for ( i = 0 ; i < numberOfTables ; i++ ) {		tableNodeList[i].name = "table" + (i+1);	}	document.forms[0].execState.value = '1';	if (showSimple && document.forms[0].simpleSelector) document.forms[0].simpleSelector.selectedIndex = 0;	if (showAdv && document.forms[0].advSelector) document.forms[0].advSelector.selectedIndex = 0;	editorDiv.focus();	setDefaultColors();	editorDiv.style.width = 525;	if (!showSimple && !showAdv) { // nothing is showing		editorDiv.style.width = 675;	}	checkPlacementForLayers();	if (showSimple) {		if (showSimpleLinkDiv) {			showSimpleFunction('modeSimpleLinkDiv')		} else if (showSimpleListDiv) {			showSimpleFunction('modeSimpleListDiv')		} else if (showSimplePixelDiv) {			showSimpleFunction('modeSimplePixelDiv')		}/*		moveLayer('modeSimpleDiv',null,null,1,null);		moveLayer('modeSimpleLinkDiv',null,null,1,null);*/	} else {		showAdvanced();		document.getElementById("advBtn").disabled = 1;	}	/* do a "Save" */	theSavedCodeDiv.innerHTML = editorDiv.innerHTML;	if (document.frames['changeTextFrame']) {		if (document.frames['changeTextFrame'].document.forms[0]) {			if (document.frames['changeTextFrame'].document.forms[0].text)				document.frames['changeTextFrame'].document.forms[0].text.value = editorDiv.innerHTML		}	}	/* focus */	if (editorDiv) editorDiv.focus();}
meta: 6464	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6464/8262ba818f8b72393f8253cf0cf62ee0d92b3026/editor_functions.js/clean/web/imcms/lang/htmleditor/scripts/editor_functions.js