rem: if (IsHTMLEditor) 
add: if (IsHTMLEditor()) 
context: function EditorSharedStartup(){  // Just for convenience  gContentWindow = window.content;  // Set up the mime type and register the commands.  if (IsHTMLEditor)    SetupHTMLEditorCommands();  else    SetupTextEditorCommands();  // add observer to be called when document is really done loading   // and is modified  // Note: We're really screwed if we fail to install this observer!  try {    var commandManager = GetCurrentCommandManager();    commandManager.addCommandObserver(gEditorDocumentObserver, "obs_documentCreated");    commandManager.addCommandObserver(gEditorDocumentObserver, "cmd_setDocumentModified");    commandManager.addCommandObserver(gEditorDocumentObserver, "obs_documentWillBeDestroyed");    commandManager.addCommandObserver(gEditorDocumentObserver, "obs_documentLocationChanged");    // Until nsIControllerCommandGroup-based code is implemented,    //  we will observe just the bold command to trigger update of    //  all toolbar style items    commandManager.addCommandObserver(gEditorDocumentObserver, "cmd_bold");  } catch (e) { dump(e); }  var isMac = (GetOS() == gMac);  // Set platform-specific hints for how to select cells  // Mac uses "Cmd", all others use "Ctrl"  var tableKey = GetString(isMac ? "XulKeyMac" : "TableSelectKey");  var dragStr = tableKey+GetString("Drag");  var clickStr = tableKey+GetString("Click");  var delStr = GetString(isMac ? "Clear" : "Del");  SafeSetAttribute("menu_SelectCell", "acceltext", clickStr);  SafeSetAttribute("menu_SelectRow", "acceltext", dragStr);  SafeSetAttribute("menu_SelectColumn", "acceltext", dragStr);  SafeSetAttribute("menu_SelectAllCells", "acceltext", dragStr);  // And add "Del" or "Clear"  SafeSetAttribute("menu_DeleteCellContents", "acceltext", delStr);  // Set text for indent, outdent keybinding  // hide UI that we don't have components for  RemoveInapplicableUIElements();  gPrefs = GetPrefs();  // Use browser colors as initial values for editor's default colors  var BrowserColors = GetDefaultBrowserColors();  if (BrowserColors)  {    gDefaultTextColor = BrowserColors.TextColor;    gDefaultBackgroundColor = BrowserColors.BackgroundColor;  }  // For new window, no default last-picked colors  gColorObj.LastTextColor = "";  gColorObj.LastBackgroundColor = "";  gColorObj.LastHighlightColor = "";}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/c8b4fcaf900da3561e032e292f6a5818e8977a09/editor.js/buggy/editor/ui/composer/content/editor.js