/* Import theme specific language pack */ tinyMCE.importThemeLanguagePack('advanced'); // Variable declarations var TinyMCE_advanced_autoImportCSSClasses = true; var TinyMCE_advanced_resizer = new Object(); var TinyMCE_advanced_buttons = [ // Control id, button img, button title, command, user_interface, value ['bold', '{$lang_bold_img}', '{$lang_bold_desc}', 'Bold'], ['italic', '{$lang_italic_img}', '{$lang_italic_desc}', 'Italic'], ['underline', '{$lang_underline_img}', '{$lang_underline_desc}', 'Underline'], ['strikethrough', 'strikethrough.gif', '{$lang_striketrough_desc}', 'Strikethrough'], ['justifyleft', 'left.gif', '{$lang_justifyleft_desc}', 'JustifyLeft'], ['justifycenter', 'center.gif', '{$lang_justifycenter_desc}', 'JustifyCenter'], ['justifyright', 'right.gif', '{$lang_justifyright_desc}', 'JustifyRight'], ['justifyfull', 'full.gif', '{$lang_justifyfull_desc}', 'JustifyFull'], ['bullist', 'bullist.gif', '{$lang_bullist_desc}', 'InsertUnorderedList'], ['numlist', 'numlist.gif', '{$lang_numlist_desc}', 'InsertOrderedList'], ['outdent', 'outdent.gif', '{$lang_outdent_desc}', 'Outdent'], ['indent', 'indent.gif', '{$lang_indent_desc}', 'Indent'], ['cut', 'cut.gif', '{$lang_cut_desc}', 'Cut'], ['copy', 'copy.gif', '{$lang_copy_desc}', 'Copy'], ['paste', 'paste.gif', '{$lang_paste_desc}', 'Paste'], ['undo', 'undo.gif', '{$lang_undo_desc}', 'Undo'], ['redo', 'redo.gif', '{$lang_redo_desc}', 'Redo'], ['link', 'link.gif', '{$lang_link_desc}', 'mceLink', true], ['unlink', 'unlink.gif', '{$lang_unlink_desc}', 'unlink'], ['image', 'image.gif', '{$lang_image_desc}', 'mceImage', true], ['cleanup', 'cleanup.gif', '{$lang_cleanup_desc}', 'mceCleanup'], ['help', 'help.gif', '{$lang_help_desc}', 'mceHelp'], ['code', 'code.gif', '{$lang_theme_code_desc}', 'mceCodeEditor'], ['hr', 'hr.gif', '{$lang_theme_hr_desc}', 'inserthorizontalrule'], ['removeformat', 'removeformat.gif', '{$lang_theme_removeformat_desc}', 'removeformat'], ['sub', 'sub.gif', '{$lang_theme_sub_desc}', 'subscript'], ['sup', 'sup.gif', '{$lang_theme_sup_desc}', 'superscript'], ['forecolor', 'forecolor.gif', '{$lang_theme_forecolor_desc}', 'mceForeColor', true], ['backcolor', 'backcolor.gif', '{$lang_theme_backcolor_desc}', 'mceBackColor', true], ['charmap', 'charmap.gif', '{$lang_theme_charmap_desc}', 'mceCharMap'], ['visualaid', 'visualaid.gif', '{$lang_theme_visualaid_desc}', 'mceToggleVisualAid'], ['anchor', 'anchor.gif', '{$lang_theme_anchor_desc}', 'mceInsertAnchor'], ['newdocument', 'newdocument.gif', '{$lang_newdocument_desc}', 'mceNewDocument'] ]; /** * Returns HTML code for the specificed control. */ function TinyMCE_advanced_getControlHTML(button_name) { var buttonTileMap = new Array('anchor.gif','backcolor.gif','bullist.gif','center.gif', 'charmap.gif','cleanup.gif','code.gif','copy.gif','custom_1.gif', 'cut.gif','forecolor.gif','full.gif','help.gif','hr.gif', 'image.gif','indent.gif','left.gif','link.gif','numlist.gif', 'outdent.gif','paste.gif','redo.gif','removeformat.gif', 'right.gif','strikethrough.gif','sub.gif','sup.gif','undo.gif', 'unlink.gif','visualaid.gif'); // Lookup button in button list for (var i=0; i'; } } } // Old style return ''; } } // Custom controlls other than buttons switch (button_name) { case "formatselect": var html = ''; //formatselect return html; case "styleselect": //styleselect return ''; case "fontselect": var fontHTML = ''; return fontHTML; case "fontsizeselect": //fontsizeselect return ''; case "|": case "separator": return ''; case "spacer": return ''; case "rowseparator": return '
'; } return ""; } /** * Theme specific exec command handeling. */ function TinyMCE_advanced_execCommand(editor_id, element, command, user_interface, value) { switch (command) { case "mceForeColor": var template = new Array(); var elm = tinyMCE.selectedInstance.getFocusElement(); var inputColor = tinyMCE.getAttrib(elm, "color"); if (inputColor == '') inputColor = elm.style.color; if (!inputColor) inputColor = "#000000"; template['file'] = 'color_picker.htm'; template['width'] = 220; template['height'] = 190; tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "forecolor", input_color : inputColor}); return true; case "mceBackColor": var template = new Array(); var elm = tinyMCE.selectedInstance.getFocusElement(); var inputColor = elm.style.backgroundColor; if (!inputColor) inputColor = "#000000"; template['file'] = 'color_picker.htm'; template['width'] = 220; template['height'] = 190; template['width'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_width', 0); template['height'] += tinyMCE.getLang('lang_theme_advanced_backcolor_delta_height', 0); tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes", command : "HiliteColor", input_color : inputColor}); //mceBackColor return true; case "mceColorPicker": if (user_interface) { var template = new Array(); var inputColor = value['document'].getElementById(value['element_id']).value; template['file'] = 'color_picker.htm'; template['width'] = 220; template['height'] = 190; template['width'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width', 0); template['height'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height', 0); if (typeof(value['store_selection']) == "undefined") value['store_selection'] = true; tinyMCE.lastColorPickerValue = value; tinyMCE.openWindow(template, {editor_id : editor_id, mce_store_selection : value['store_selection'], inline : "yes", command : "mceColorPicker", input_color : inputColor}); } else { var savedVal = tinyMCE.lastColorPickerValue; var elm = savedVal['document'].getElementById(savedVal['element_id']); elm.value = value; eval('elm.onchange();'); } return true; case "mceCodeEditor": var template = new Array(); template['file'] = 'source_editor.htm'; template['width'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_width", 500)); template['height'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_height", 400)); tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "no", inline : "yes"}); //mceCodeEditor return true; case "mceCharMap": var template = new Array(); template['file'] = 'charmap.htm'; template['width'] = 550; template['height'] = 250; template['width'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_width', 0); template['height'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_height', 0); tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); //mceCharMap return true; case "mceInsertAnchor": var template = new Array(); template['file'] = 'anchor.htm'; template['width'] = 320; template['height'] = 90; template['width'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_width', 0); template['height'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_height', 0); tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"}); return true; case "mceNewDocument": if (confirm(tinyMCE.getLang('lang_newdocument'))) tinyMCE.execInstanceCommand(editor_id, 'mceSetContent', false, ''); return true; } // Default behavior return false; } /** * Editor instance template function. */ function TinyMCE_advanced_getEditorTemplate(settings, editorId) { function removeFromArray(in_array, remove_array) { var outArray = new Array(); for (var i=0; i 

'; var layoutManager = tinyMCE.getParam("theme_advanced_layout_manager", "SimpleLayout"); // Setup style select options -- MOVED UP FOR EXTERNAL TOOLBAR COMPATABILITY! var styleSelectHTML = ''; if (settings['theme_advanced_styles']) { var stylesAr = settings['theme_advanced_styles'].split(';'); for (var i=0; i' + key + ''; } 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 0) { toolbarHTML += "
"; deltaHeight -= 23; } } // Setup template html template['html'] = ''; if (toolbarLocation == "top") { template['html'] += ''; } if (statusbarLocation == "top") { template['html'] += ''; deltaHeight -= 23; } template['html'] += ''; if (toolbarLocation == "bottom") { template['html'] += ''; } // 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 = '
' + toolbarHTML + '
' + statusbarHTML + '
' + toolbarHTML + '
'+toolbarHTML+'
'; bod.appendChild (elm); // bod.style.marginTop = elm.offsetHeight + "px"; deltaHeight = 0; tinyMCE.getInstanceById(editorId).toolbarElement = elm; //template['html'] = '
'+toolbarHTML+'
' + template["html"]; } else { tinyMCE.getInstanceById(editorId).toolbarElement = null; } if (statusbarLocation == "bottom") { template['html'] += '' + statusbarHTML + ''; deltaHeight -= 23; } template['html'] += ''; //"SimpleLayout" break; case "RowLayout" : //Container Layout - containers defined in "theme_advanced_containers" are rendered from top to bottom. template['html'] = ''; 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'] += ''; } 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'] += ''; 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 0) { curContainerHTML += "
"; deltaHeight -= 23; } template['html'] += '
'; } } template['html'] += '
\ \
' + statusbarHTML + '
' + curContainerHTML + '
'; //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'] += '
'; template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML); template['delta_width'] = 0; template['delta_height'] = deltaHeight; return template; } /** * Starts/stops the editor resizing. */ function TinyMCE_advanced_setResizing(e, editor_id, state) { e = typeof(e) == "undefined" ? window.event : e; var resizer = TinyMCE_advanced_resizer; var editorContainer = document.getElementById(editor_id + '_parent'); var editorArea = document.getElementById(editor_id + '_parent').firstChild; var resizeBox = document.getElementById(editor_id + '_resize_box'); var inst = tinyMCE.getInstanceById(editor_id); if (state) { // Place box over editor area var width = editorArea.clientWidth; var height = editorArea.clientHeight; resizeBox.style.width = width + "px"; resizeBox.style.height = height + "px"; resizer.iframeWidth = inst.iframeElement.clientWidth; resizer.iframeHeight = inst.iframeElement.clientHeight; // Hide editor and show resize box editorArea.style.display = "none"; resizeBox.style.display = "block"; // Add event handlers, only once if (!resizer.eventHandlers) { if (tinyMCE.isMSIE) tinyMCE.addEvent(document, "mousemove", TinyMCE_advanced_resizeEventHandler); else tinyMCE.addEvent(window, "mousemove", TinyMCE_advanced_resizeEventHandler); tinyMCE.addEvent(document, "mouseup", TinyMCE_advanced_resizeEventHandler); resizer.eventHandlers = true; } resizer.resizing = true; resizer.downX = e.screenX; resizer.downY = e.screenY; resizer.width = parseInt(resizeBox.style.width); resizer.height = parseInt(resizeBox.style.height); resizer.editorId = editor_id; resizer.resizeBox = resizeBox; resizer.horizontal = tinyMCE.getParam("theme_advanced_resize_horizontal", true); } else { resizer.resizing = false; resizeBox.style.display = "none"; editorArea.style.display = tinyMCE.isMSIE ? "block" : "table"; tinyMCE.execCommand('mceResetDesignMode'); } } function TinyMCE_advanced_initInstance(inst) { if (tinyMCE.getParam("theme_advanced_resizing", false)) { var w = TinyMCE_advanced_getCookie("TinyMCE_" + inst.editorId + "_width"); var h = TinyMCE_advanced_getCookie("TinyMCE_" + inst.editorId + "_height"); TinyMCE_advanced_resizeTo(inst, w, h, tinyMCE.getParam("theme_advanced_resize_horizontal", true)); } } function TinyMCE_advanced_setCookie(name, value, expires, path, domain, secure) { var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + escape(path) : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie; } function TinyMCE_advanced_getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else begin += 2; var end = document.cookie.indexOf(";", begin); if (end == -1) end = dc.length; return unescape(dc.substring(begin + prefix.length, end)); } function TinyMCE_advanced_resizeTo(inst, w, h, set_w) { var editorContainer = document.getElementById(inst.editorId + '_parent'); var tableElm = editorContainer.firstChild; var iframe = inst.iframeElement; if (w == null || w == "null") { set_w = false; w = 0; } if (h == null || h == "null") return; w = parseInt(w); h = parseInt(h); if (tinyMCE.isGecko) { w += 2; h += 2; } var dx = w - tableElm.clientWidth; var dy = h - tableElm.clientHeight; if (set_w) tableElm.style.width = w + "px"; tableElm.style.height = h + "px"; iw = iframe.clientWidth + dx; ih = iframe.clientHeight + dy; if (tinyMCE.isGecko) { iw -= 2; ih -= 2; } if (set_w) iframe.style.width = iw + "px"; iframe.style.height = ih + "px"; // Is it to small, make it bigger again if (set_w) { var tableBodyElm = tableElm.firstChild; var minIframeWidth = tableBodyElm.scrollWidth; if (inst.iframeElement.clientWidth < minIframeWidth) { dx = minIframeWidth - inst.iframeElement.clientWidth; inst.iframeElement.style.width = (iw + dx) + "px"; } } } /** * Handles resizing events. */ function TinyMCE_advanced_resizeEventHandler(e) { var resizer = TinyMCE_advanced_resizer; // Do nothing if (!resizer.resizing) return; e = typeof(e) == "undefined" ? window.event : e; var dx = e.screenX - resizer.downX; var dy = e.screenY - resizer.downY; var resizeBox = resizer.resizeBox; var editorId = resizer.editorId; switch (e.type) { case "mousemove": if (resizer.horizontal) resizeBox.style.width = (resizer.width + dx) + "px"; resizeBox.style.height = (resizer.height + dy) + "px"; break; case "mouseup": TinyMCE_advanced_setResizing(e, editorId, false); TinyMCE_advanced_resizeTo(tinyMCE.getInstanceById(editorId), resizer.width + dx, resizer.height + dy, resizer.horizontal); // Expire in a month var expires = new Date(); expires.setTime(expires.getTime() + 3600000 * 24 * 30); // Set the cookies TinyMCE_advanced_setCookie("TinyMCE_" + editorId + "_width", "" + (resizer.horizontal ? resizer.width + dx : ""), expires); TinyMCE_advanced_setCookie("TinyMCE_" + editorId + "_height", "" + (resizer.height + dy), expires); break; } } /** * Insert link template function. */ function TinyMCE_advanced_getInsertLinkTemplate() { var template = new Array(); template['file'] = 'link.htm'; template['width'] = 330; template['height'] = 170; // Language specific width and height addons template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0); template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0); return template; }; /** * Insert image template function. */ function TinyMCE_advanced_getInsertImageTemplate() { var template = new Array(); template['file'] = 'image.htm?src={$src}'; template['width'] = 340; template['height'] = 245; // Language specific width and height addons template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0); template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0); return template; }; /** * Node change handler. */ 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=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') + " "; } var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false); if (className != "" && className.indexOf('mceItem') == -1) nodeData += "class: " + 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" && tinyMCE.getAttrib(path[i], "class").indexOf('mceItemFlash') != -1) { nodeName = "flash"; nodeData = ""; } if (nodeName == "a" && (anchor = tinyMCE.getAttrib(path[i], "name")) != "") { nodeName = "a"; nodeName += "#" + anchor; nodeData = ""; } if (getAttrib(path[i], 'name').indexOf("mce_") != 0) { var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(path[i], "class"), false); if (className != "" && className.indexOf('mceItem') == -1) nodeName += "." + className; } if (tinyMCE.isMSIE) { html += '' + nodeName + ''; } else { html += '' + nodeName + ''; } if (i > 0) { html += " » "; } } pathElm.innerHTML = tinyMCE.getLang('lang_theme_path') + ": " + html + ' '; } // 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'); if (node.nodeName == "A" && tinyMCE.getAttrib(node, "class").indexOf('mceItemAnchor') != -1) 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"); } else { selectByValue(selectElm, ""); } } // Select fontselect var selectElm = document.getElementById(editor_id + "_fontNameSelect"); if (selectElm) { var elm = tinyMCE.getParentElement(node); if (elm) { var family = tinyMCE.getAttrib(elm, "face"); if (family == '') family = '' + elm.style.fontFamily; if (!selectByValue(selectElm, family)) selectByValue(selectElm, ""); } else selectByValue(selectElm, ""); } // Select fontsize var selectElm = document.getElementById(editor_id + "_fontSizeSelect"); if (selectElm) { var elm = tinyMCE.getParentElement(node); if (elm) { var size = tinyMCE.getAttrib(elm, "size"); if (size == '') { var sizes = new Array('', '8px', '10px', '12px', '14px', '18px', '24px', '36px'); size = '' + elm.style.fontSize; for (var i=0; i 0) { selectElm.setAttribute('cssImported', 'true'); } } };