rem: editorShell.contentWindow = gContentWindow; 
add: editorShell.contentWindow = window.content; 
context: function EditorStartup(editorType, editorElement){  gContentWindow = window.content;  gSourceContentWindow = document.getElementById("content-source");  gIsHTMLEditor = (editorType == "html");  if (gIsHTMLEditor)  {    gEditModeLabel     = document.getElementById("EditModeLabel");     gNormalModeButton  = document.getElementById("NormalModeButton");    gTagModeButton     = document.getElementById("TagModeButton");    gSourceModeButton  = document.getElementById("SourceModeButton");    gPreviewModeButton = document.getElementById("PreviewModeButton");    // The "type" attribute persists, so use that value    //  to setup edit mode buttonsdump("Edit Mode: "+gNormalModeButton.getAttribute('type')+"\n");    ToggleEditModeType(gNormalModeButton.getAttribute("type"));    // XUL elements we use when switching from normal editor to edit source    gContentWindowDeck = document.getElementById("ContentWindowDeck");    gFormatToolbar = document.getElementById("FormatToolbar");  }  gIsWin = navigator.appVersion.indexOf("Win") != -1;  gIsUNIX = (navigator.appVersion.indexOf("X11") ||              navigator.appVersion.indexOf("nux")) != -1;  gIsMac = !gIsWin && !gIsUNIX;  dump("IsWin="+gIsWin+", IsUNIX="+gIsUNIX+", IsMac="+gIsMac+"\n");  // store the editor shell in the window, so that child windows can get to it.  editorShell = editorElement.editorShell;    editorShell.Init();  editorShell.SetEditorType(editorType);  editorShell.webShellWindow = window;  editorShell.contentWindow = gContentWindow;  // hide UI that we don't have components for  HideInapplicableUIElements();  // set up JS-implemented commands  SetupControllerCommands();    // add a listener to be called when document is really done loading  editorShell.RegisterDocumentStateListener( DocumentStateListener );   // set up our global prefs object  GetPrefsService();     // Get url for editor content and load it.  // the editor gets instantiated by the editor shell when the URL has finished loading.  var url = document.getElementById("args").getAttribute("value");  editorShell.LoadUrl(url);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/9a3e6237275e80d5e47235ea02622d2e8003692c/editor.js/clean/editor/ui/composer/content/editor.js