rem: var spellingMenuItem = document.getElementById("menu_checkspelling"); if (spellingMenuItem) spellingMenuItem.setAttribute("hidden", "true");  var spellingSepItem  = document.getElementById("sep_checkspelling"); if (spellingSepItem) spellingSepItem.parentNode.removeChild(spellingSepItem); 
add:  if (editorShell.editorType == "text") { HideItem("insertAnchor"); HideItem("insertImage"); HideItem("insertHline"); HideItem("insertTable"); HideItem("insertHTML"); HideItem("fileExportToText"); HideItem("viewFormatToolbar"); HideItem("viewEditModeToolbar"); 
context: function RemoveInapplicableUIElements(){  // For items that are in their own menu block, remove associated separator  // (we can't use "hidden" since class="hide-in-IM" CSS rule interferes)   // if no find, remove find ui  if (!IsFindInstalled())  {    var findMenuItem = document.getElementById("menu_find");    if (findMenuItem)      findMenuItem.setAttribute("hidden", "true");    findMenuItem = document.getElementById("menu_findnext");    if (findMenuItem)      findMenuItem.setAttribute("hidden", "true");    var replaceMenuItem = document.getElementById("menu_replace");    if (replaceMenuItem)      replaceMenuItem.setAttribute("hidden", "true");    var findSepItem  = document.getElementById("sep_find");    if (findSepItem)      findSepItem.parentNode.removeChild(findSepItem);  }   // if no spell checker, remove spell checker ui  if (!IsSpellCheckerInstalled())  {    var spellingButton = document.getElementById("spellingButton");    if (spellingButton)      spellingButton.setAttribute("hidden", "true");    var spellingMenuItem = document.getElementById("menu_checkspelling");    if (spellingMenuItem)      spellingMenuItem.setAttribute("hidden", "true");    var spellingSepItem  = document.getElementById("sep_checkspelling");    if (spellingSepItem)      spellingSepItem.parentNode.removeChild(spellingSepItem);  }}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/4dbae367965f08293cddf648b012b562fbf77b33/editor.js/buggy/editor/ui/composer/content/editor.js