rem: for (var i=0; i<stylesAr.length; i++) { 
add: for (var i=0; i<stylesAr.length; i++) { 
context: function TinyMCE_advanced_getEditorTemplate(settings, editorId){	function removeFromArray(in_array, remove_array)	{		var outArray = new Array();				for (var i=0; i<in_array.length; i++)		{			skip = false;			for (var j=0; j<remove_array.length; j++)			{				if (in_array[i] == remove_array[j])				{					skip = true;				}			}			if (!skip)			{				outArray[outArray.length] = in_array[i];			}		}		return outArray;	}	function addToArray(in_array, add_array)	{		for (var i=0; i<add_array.length; i++)		{			in_array[in_array.length] = add_array[i];		}		return in_array;	}	var template = new Array();	var deltaHeight = 0;	var resizing = tinyMCE.getParam("theme_advanced_resizing", false);	var path = tinyMCE.getParam("theme_advanced_path", true);	var statusbarHTML = '<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: ' + (path ? "block" : "none") + '">&nbsp;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: ' + (resizing ? "block" : "none") + '" onmousedown="TinyMCE_advanced_setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';	var layoutManager = tinyMCE.getParam("theme_advanced_layout_manager", "SimpleLayout");	// Setup style select options -- MOVED UP FOR EXTERNAL TOOLBAR COMPATABILITY!	var styleSelectHTML = '<option value="">{$lang_theme_style_select}</option>';	if (settings['theme_advanced_styles'])	{		var stylesAr = settings['theme_advanced_styles'].split(';');				for (var i=0; i<stylesAr.length; i++)		{			var key, value;			key = stylesAr[i].split('=')[0];			value = stylesAr[i].split('=')[1];			styleSelectHTML += '<option value="' + value + '">' + key + '</option>';		}		TinyMCE_advanced_autoImportCSSClasses = false;	}	switch(layoutManager)	{		case "SimpleLayout" : //the default TinyMCE Layout (for backwards compatibility)...			var toolbarHTML = "";			var toolbarLocation = tinyMCE.getParam("theme_advanced_toolbar_location", "bottom");			var toolbarAlign = tinyMCE.getParam("theme_advanced_toolbar_align", "center");			var pathLocation = tinyMCE.getParam("theme_advanced_path_location", "none"); // Compatiblity			var statusbarLocation = tinyMCE.getParam("theme_advanced_statusbar_location", pathLocation);			var defVals = {				theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",				theme_advanced_buttons2 : "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",				theme_advanced_buttons3 : "hr,removeformat,visualaid,separator,sub,sup,separator,charmap"			};			// Render rows			for (var i=1; i<100; i++) {				var def = defVals["theme_advanced_buttons" + i];				buttons = tinyMCE.getParam("theme_advanced_buttons" + i, def == null ? '' : def, true, ',');				if (buttons.length == 0)					break;				buttons = removeFromArray(buttons, tinyMCE.getParam("theme_advanced_disable", "", true, ','));				buttons = addToArray(buttons, tinyMCE.getParam("theme_advanced_buttons" + i + "_add", "", true, ','));				buttons = addToArray(tinyMCE.getParam("theme_advanced_buttons" + i + "_add_before", "", true, ','), buttons);				for (var b=0; b<buttons.length; b++)					toolbarHTML += tinyMCE.getControlHTML(buttons[b]);				if (buttons.length > 0) {					toolbarHTML += "<br />";					deltaHeight -= 23;				}			}			// Setup template html			template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';			if (toolbarLocation == "top")			{				template['html'] += '<tr><td class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap">' + toolbarHTML + '</td></tr>';			}			if (statusbarLocation == "top")			{				template['html'] += '<tr><td class="mceStatusbarTop" height="1">' + statusbarHTML + '</td></tr>';				deltaHeight -= 23;			}			template['html'] += '<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';			if (toolbarLocation == "bottom")			{				template['html'] += '<tr><td class="mceToolbarBottom" align="' + toolbarAlign + '" height="1">' + toolbarHTML + '</td></tr>';			}			// External toolbar changes			if (toolbarLocation == "external")			{				var bod = document.body;				var elm = document.createElement ("div");								toolbarHTML = tinyMCE.replaceVars(toolbarHTML, tinyMCE.settings);				toolbarHTML = tinyMCE.replaceVars(toolbarHTML, tinyMCELang);				toolbarHTML = tinyMCE.replaceVar(toolbarHTML, 'style_select_options', styleSelectHTML);				toolbarHTML = tinyMCE.replaceVar(toolbarHTML, "editor_id", editorId);				toolbarHTML = tinyMCE.applyTemplate(toolbarHTML);				elm.className = "mceToolbarExternal";				elm.id = editorId+"_toolbar";				elm.innerHTML = '<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';				bod.appendChild (elm);				// bod.style.marginTop = elm.offsetHeight + "px";				deltaHeight = 0;				tinyMCE.getInstanceById(editorId).toolbarElement = elm;				//template['html'] = '<div id="mceExternalToolbar" align="center" class="mceToolbarExternal"><table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table></div>' + template["html"];			}			else			{				tinyMCE.getInstanceById(editorId).toolbarElement = null;			}			if (statusbarLocation == "bottom")			{				template['html'] += '<tr><td class="mceStatusbarBottom" height="1">' + statusbarHTML + '</td></tr>';				deltaHeight -= 23;			}			template['html'] += '</table>';			//"SimpleLayout"		break;		case "RowLayout" : //Container Layout - containers defined in "theme_advanced_containers" are rendered from top to bottom.			template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';			var containers = tinyMCE.getParam("theme_advanced_containers", "", true, ",");			var defaultContainerCSS = tinyMCE.getParam("theme_advanced_containers_default_class", "container");			var defaultContainerAlign = tinyMCE.getParam("theme_advanced_containers_default_align", "center");			//Render Containers:			for (var i = 0; i < containers.length; i++)			{				if (containers[i] == "mceEditor") //Exceptions for mceEditor and ...				{					template['html'] += '<tr><td align="center" class="mceEditor_border">\												<span id="{$editor_id}"></span>\												</td></tr>';				}				else if (containers[i] == "mceElementpath" || containers[i] == "mceStatusbar") // ... mceElementpath:				{					var pathClass = "mceStatusbar";					if (i == containers.length-1)					{						pathClass = "mceStatusbarBottom";					}					else if (i == 0)					{						pathClass = "mceStatusbar";					}					else					{						deltaHeight-=2;					}					template['html'] += '<tr><td class="' + pathClass + '" height="1">' + statusbarHTML + '</td></tr>';					deltaHeight -= 22;				}				else //Render normal Container:				{					var curContainer = tinyMCE.getParam("theme_advanced_container_"+containers[i], "", true, ',');					var curContainerHTML = "";					var curAlign = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align", defaultContainerAlign);					var curCSS = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class", defaultContainerCSS);					for (var j=0; j<curContainer.length; j++)					{						curContainerHTML += tinyMCE.getControlHTML(curContainer[j]);					}					if (curContainer.length > 0)					{						curContainerHTML += "<br />";						deltaHeight -= 23;					}					template['html'] += '<tr><td class="' + curCSS + '" align="' + curAlign + '" height="1">' + curContainerHTML + '</td></tr>';				}			}			template['html'] += '</tbody></table>';			//RowLayout		break;		case "BorderLayout" : //will be like java.awt.BorderLayout of SUN Java...			// Not implemented yet... 		break;		case "CustomLayout" : //User defined layout callback...			var customLayout = tinyMCE.getParam("theme_advanced_custom_layout","");						if (customLayout != "" && eval("typeof(" + customLayout + ")") != "undefined")			{				template = eval(customLayout + "(template);");			}		break;					default:			alert('UNDEFINED LAYOUT MANAGER! PLEASE CHECK YOUR TINYMCE CONFIG!');			//CustomLayout		break;	}	template['html'] += '<div id="{$editor_id}_resize_box" class="mceResizeBox"></div>';	template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML);	template['delta_width'] = 0;	template['delta_height'] = deltaHeight;	return template;}
meta: 4999	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4999/344b1dcee015ec3eb8ceb999d8fdd03d8d9eaeec/editor_template_src.js/clean/wp-includes/js/tinymce/themes/advanced/editor_template_src.js