rem:  window.updateCommands("create"); 
add: addEditorClickEventListener(); 
context:   NotifyDocumentCreated: function()  {    gEditor = editorShell.editor;    // Just for convenience    gContentWindow = window._content;    // do all of our QI'ing here so we don't need to do it elsewhere    DoAllQueryInterfaceOnEditor();    if (editorShell.editorType == "htmlmail"        || editorShell.editorType == "textmail")    {      gEditor.QueryInterface(Components.interfaces.nsIEditorMailSupport);    }    else    {      // Mail Composers start focus in address area      gContentWindow.focus();    }    if (!("InsertCharWindow" in window))      window.InsertCharWindow = null;    try {      // Add the base sheets for editor cursor etc.      gEditor.addOverrideStyleSheet(kBaseEditorStyleSheet);      //  and extra styles for showing anchors, table borders, smileys, etc      gEditor.addOverrideStyleSheet(kNormalStyleSheet);    } catch (e) {}    // XXX Temporary: This should be set during startup     //  once we finish transition from nsIEditorShell is to nsIEditorSession    try {      gEditor.contentsMIMEType = gIsHTMLEditor ? kHTMLMimeType : kTextMimeType;    } catch(e) {}        // Add mouse click watcher if right type of editor    if (isHTMLEditor())      addEditorClickEventListener();    // udpate menu items now that we have an editor to play with    window.updateCommands("create");    // Do the rest only if a Web Composer application    if (IsWebComposer())    {      // Get the window command controller created in SetupComposerWindowCommands()      if (gComposerWindowControllerID != -1)      {        try {           var controller = window.controllers.getControllerById(gComposerWindowControllerID);          controller.SetCommandRefCon(gEditor.QueryInterface(Components.interfaces.nsISupports));        } catch (e) {}      }      // Call EditorSetDefaultPrefsAndDoctype first so it gets the default author before initing toolbars      EditorSetDefaultPrefsAndDoctype();      EditorInitToolbars();          // Set window title and build "Recent Files" menu        // (to detect empty menu and disable it)      UpdateWindowTitle();      BuildRecentMenu();      // We must wait until document is created to get proper Url      // (Windows may load with local file paths)      SetSaveAndPublishUI(GetDocumentUrl());      // Start in "Normal" edit mode      SetDisplayMode(kDisplayModeNormal);    }  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4bff37b50933737e10fd1aa331dadb945a104831/editor.js/clean/editor/ui/composer/content/editor.js