add: }  if (getAttrib(path[i], 'name').indexOf("mce_") != 0) { if (getAttrib(path[i], "className") != "") nodeName += "." + getAttrib(path[i], "className"); else if (getAttrib(path[i], "class") != "") nodeName += "." + getAttrib(path[i], "class"); 
context: function TinyMCE_advanced_handleNodeChange(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {	function selectByValue(select_elm, value) {		if (select_elm) {			for (var i=0; i<select_elm.options.length; i++) {				if (select_elm.options[i].value == value) {					select_elm.selectedIndex = i;					return true;				}			}		}		return false;	}	function getAttrib(elm, name) {		return elm.getAttribute(name) ? elm.getAttribute(name) : "";	}	// Update path	var pathElm = document.getElementById(editor_id + "_path");	if (pathElm) {		// Get node path		var parentNode = node;		var path = new Array();		while (parentNode) {			if (parentNode.nodeName.toLowerCase() == "body")				break;			// Only append element nodes to path			if (parentNode.nodeType == 1)				path[path.length] = parentNode;			parentNode = parentNode.parentNode;		}		// Setup HTML		var html = "";		for (var i=path.length-1; i>=0; i--) {			var nodeName = path[i].nodeName.toLowerCase();			var nodeData = "";			if (nodeName == "b")				nodeName = "strong";			if (nodeName == "i")				nodeName = "em";			if (getAttrib(path[i], 'id') != "")				nodeData += "id: " + path[i].getAttribute('id') + " ";			if (getAttrib(path[i], 'class') != "")				nodeData += "class: " + path[i].getAttribute('class') + " ";			if (getAttrib(path[i], 'className') != "")				nodeData += "class: " + path[i].getAttribute('className') + " ";			if (getAttrib(path[i], 'src') != "")				nodeData += "src: " + path[i].getAttribute('src') + " ";			if (getAttrib(path[i], 'href') != "")				nodeData += "href: " + path[i].getAttribute('href') + " ";			if (nodeName == "img" && getAttrib(path[i], 'name') == "mce_plugin_flash") {				nodeName = "flash";				nodeData = "";			}			if (tinyMCE.isMSIE)				html += '<a title="' + nodeData + '" href="javascript:void(0);" onmousedown="tinyMCE.execInstanceCommand(\'' + editor_id + '\',\'mceSelectNodeDepth\',false,\'' + i + '\');return false;" class="mcePathItem">' + nodeName + '</a>';			else				html += '<a title="' + nodeData + '" href="javascript:tinyMCE.execInstanceCommand(\'' + editor_id + '\',\'mceSelectNodeDepth\',false,\'' + i + '\');" class="mcePathItem">' + nodeName + '</a>';			if (i > 0)				html += " &raquo; ";		}		pathElm.innerHTML = html + "&nbsp;";	}	// Get element color	var colorElm = tinyMCE.getParentElement(node, "font", "color");	if (colorElm)		TinyMCE_advanced_foreColor = "" + colorElm.color.toUpperCase();	// Reset old states	tinyMCE.switchClassSticky(editor_id + '_justifyleft', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_justifyright', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_justifycenter', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_justifyfull', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_sub', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_sup', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_anchor', 'mceButtonNormal');	tinyMCE.switchClassSticky(editor_id + '_link', 'mceButtonDisabled', true);	tinyMCE.switchClassSticky(editor_id + '_unlink', 'mceButtonDisabled', true);	tinyMCE.switchClassSticky(editor_id + '_outdent', 'mceButtonDisabled', true);    tinyMCE.switchClassSticky(editor_id + '_image', 'mceButtonNormal');    tinyMCE.switchClassSticky(editor_id + '_hr', 'mceButtonNormal');	// Get anchor name	var anchorName = tinyMCE.getParentElement(node, "a", "name");	TinyMCE_advanced_anchorName = "";	if (anchorName) {		TinyMCE_advanced_anchorName = anchorName.getAttribute("name");		tinyMCE.switchClassSticky(editor_id + '_anchor', 'mceButtonSelected');	}	// Get link	var anchorLink = tinyMCE.getParentElement(node, "a", "href");	if (anchorLink || any_selection) {		tinyMCE.switchClassSticky(editor_id + '_link', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal', false);		tinyMCE.switchClassSticky(editor_id + '_unlink', anchorLink ? 'mceButtonSelected' : 'mceButtonNormal', false);	}	// Handle visual aid	tinyMCE.switchClassSticky(editor_id + '_visualaid', visual_aid ? 'mceButtonSelected' : 'mceButtonNormal', false);	if (undo_levels != -1) {		tinyMCE.switchClassSticky(editor_id + '_undo', 'mceButtonDisabled', true);		tinyMCE.switchClassSticky(editor_id + '_redo', 'mceButtonDisabled', true);	}	// Within li, blockquote	if (tinyMCE.getParentElement(node, "li,blockquote"))		tinyMCE.switchClassSticky(editor_id + '_outdent', 'mceButtonNormal', false);	// Has redo levels	if (undo_index != -1 && (undo_index < undo_levels-1 && undo_levels > 0))		tinyMCE.switchClassSticky(editor_id + '_redo', 'mceButtonNormal', false);	// Has undo levels	if (undo_index != -1 && (undo_index > 0 && undo_levels > 0))		tinyMCE.switchClassSticky(editor_id + '_undo', 'mceButtonNormal', false);	// Select class in select box	var selectElm = document.getElementById(editor_id + "_styleSelect");	if (selectElm) {		TinyMCE_advanced_setupCSSClasses(editor_id);		classNode = node;		breakOut = false;		var index = 0;		do {			if (classNode && classNode.className) {				for (var i=0; i<selectElm.options.length; i++) {					if (selectElm.options[i].value == classNode.className) {						index = i;						breakOut = true;						break;					}				}			}		} while (!breakOut && classNode != null && (classNode = classNode.parentNode));		selectElm.selectedIndex = index;	}	// Select formatblock	var selectElm = document.getElementById(editor_id + "_formatSelect");	if (selectElm) {		var elm = tinyMCE.getParentElement(node, "p,div,h1,h2,h3,h4,h5,h6,pre,address");		if (elm) {			selectByValue(selectElm, "<" + elm.nodeName.toLowerCase() + ">");		} else			selectByValue(selectElm, "<p>");	}	// Select fontselect	var selectElm = document.getElementById(editor_id + "_fontNameSelect");	if (selectElm) {		var elm = tinyMCE.getParentElement(node, "font", "face");		if (elm)			selectByValue(selectElm, elm.getAttribute("face"));		else			selectByValue(selectElm, "");	}	// Select fontsize	var selectElm = document.getElementById(editor_id + "_fontSizeSelect");	if (selectElm) {		var elm = tinyMCE.getParentElement(node, "font", "size");		if (elm && getAttrib(elm, "size") != "")			selectByValue(selectElm, elm.getAttribute("size"));		else			selectByValue(selectElm, "0");	}	// Handle align attributes	alignNode = node;	breakOut = false;	do {		if (!alignNode.getAttribute || !alignNode.getAttribute('align'))			continue;		switch (alignNode.getAttribute('align').toLowerCase()) {			case "left":				tinyMCE.switchClassSticky(editor_id + '_justifyleft', 'mceButtonSelected');				breakOut = true;			break;			case "right":				tinyMCE.switchClassSticky(editor_id + '_justifyright', 'mceButtonSelected');				breakOut = true;			break;			case "middle":			case "center":				tinyMCE.switchClassSticky(editor_id + '_justifycenter', 'mceButtonSelected');				breakOut = true;			break;			case "justify":				tinyMCE.switchClassSticky(editor_id + '_justifyfull', 'mceButtonSelected');				breakOut = true;			break;		}	} while (!breakOut && (alignNode = alignNode.parentNode));	// Handle elements	do {		switch (node.nodeName.toLowerCase()) {			case "b":			case "strong":				tinyMCE.switchClassSticky(editor_id + '_bold', 'mceButtonSelected');			break;			case "i":			case "em":				tinyMCE.switchClassSticky(editor_id + '_italic', 'mceButtonSelected');			break;			case "u":				tinyMCE.switchClassSticky(editor_id + '_underline', 'mceButtonSelected');			break;			case "strike":				tinyMCE.switchClassSticky(editor_id + '_strikethrough', 'mceButtonSelected');			break;			case "ul":				tinyMCE.switchClassSticky(editor_id + '_bullist', 'mceButtonSelected');			break;			case "ol":				tinyMCE.switchClassSticky(editor_id + '_numlist', 'mceButtonSelected');			break;			case "sub":				tinyMCE.switchClassSticky(editor_id + '_sub', 'mceButtonSelected');			break;			case "sup":				tinyMCE.switchClassSticky(editor_id + '_sup', 'mceButtonSelected');			break;            case "hr":                tinyMCE.switchClassSticky(editor_id + '_hr', 'mceButtonSelected');            break;            case "img":				if (getAttrib(node, 'name').indexOf('mce_') != 0)					tinyMCE.switchClassSticky(editor_id + '_image', 'mceButtonSelected');            break;		}	} while ((node = node.parentNode));}
meta: 1948	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1948/914f29b169169eaf678616905b5062afd73de30a/editor_template_src.js/clean/www/extras/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js