rem: var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor); if (!htmlEditor) 
add: if (!gIsHTMLEditor) 
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())  {    HideItem("menu_find");    HideItem("menu_findnext");    HideItem("menu_replace");    HideItem("menu_find");    RemoveItem("sep_find");  }   // if no spell checker, remove spell checker ui  if (!IsSpellCheckerInstalled())  {    HideItem("spellingButton");    HideItem("menu_checkspelling");    RemoveItem("sep_checkspelling");  }  else  {    SetElementEnabled(document.getElementById("menu_checkspelling"), true);    SetElementEnabled(document.getElementById("spellingButton"), true);    SetElementEnabled(document.getElementById("checkspellingkb"), true);  }  if (!gEditor)  {    // XXX This is called once too early, so detect that case.    // Announce the problem so we know it needs to be fixed.    dump("RemoveInapplicableUIElements called too early\n");    return;  }  // Remove menu items (from overlay shared with HTML editor) in non-HTML.  var htmlEditor = gEditor.QueryInterface(Components.interfaces.nsIHTMLEditor);  if (!htmlEditor)  {    HideItem("insertAnchor");    HideItem("insertImage");    HideItem("insertHline");    HideItem("insertTable");    HideItem("insertHTML");    HideItem("insertFormMenu");    HideItem("fileExportToText");    HideItem("viewFormatToolbar");    HideItem("viewEditModeToolbar");  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/160100a09b4b930d5b308fda04a1e21843697414/editor.js/clean/editor/ui/composer/content/editor.js