From 9b98a91bebef5f4513dd4e86e823db3deb0d1106 Mon Sep 17 00:00:00 2001 From: "cmanske%netscape.com" Date: Mon, 15 May 2000 03:05:39 +0000 Subject: [PATCH] Use EditorSharedStart() for initialization needed by mail composer git-svn-id: svn://10.0.0.236/trunk@69726 18797224-902f-48f8-a5cc-f745e15eee43 --- .../resources/content/MsgComposeCommands.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js b/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js index 73c2e1beff5..832880883c7 100644 --- a/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js +++ b/mozilla/mailnews/compose/resources/content/MsgComposeCommands.js @@ -207,8 +207,8 @@ function ComposeStartup() if (msgCompose) { //Creating a Editor Shell - var editorShell = Components.classes["component://netscape/editor/editorshell"].createInstance(); - editorShell = editorShell.QueryInterface(Components.interfaces.nsIEditorShell); + var editorShell = Components.classes["component://netscape/editor/editorshell"].createInstance(); + editorShell = editorShell.QueryInterface(Components.interfaces.nsIEditorShell); if (!editorShell) { dump("Failed to create editorShell!\n"); @@ -220,8 +220,6 @@ function ComposeStartup() window.editorShell.Init(); dump("Created editorShell\n"); - contentWindow = window.content; - // setEditorType MUST be call before setContentWindow if (msgCompose.composeHTML) { @@ -238,12 +236,11 @@ function ComposeStartup() window.editorShell.SetEditorType("textmail"); dump("editor initialized in PLAIN TEXT mode\n"); } - window.editorShell.webShellWindow = window; - window.editorShell.contentWindow = contentWindow; + window.editorShell.contentWindow = window.content; - // set up JS-implemented commands - SetupControllerCommands(); + // Do setup common to Message Composer and Web Composer + EditorSharedStartup(); var msgCompFields = msgCompose.compFields; if (msgCompFields) @@ -814,7 +811,7 @@ function AdjustFocus() else { dump("set focus on the body\n"); - contentWindow.focus(); + editorShell.contentWindow.focus(); } } }