From a7ed2ac01b29c6d3804fc0345e0e1c93583def4f Mon Sep 17 00:00:00 2001 From: "tbogard%aol.net" Date: Fri, 15 Oct 1999 21:58:49 +0000 Subject: [PATCH] Changed TextEditorAppShell.xul to use the new XUL editor tag instead of html:iframe. Changed EditorStartup to take an element. Changed EditorStartup to request the EditorShell from the editorElement rather than doing a createInstance and QI. r=hyatt git-svn-id: svn://10.0.0.236/trunk@50875 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/ui/composer/content/EditorCommands.js | 11 ++++++----- .../editor/ui/composer/content/TextEditorAppShell.xul | 4 ++-- .../suite/debugQA/content/debugQATextEditorShell.xul | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/mozilla/editor/ui/composer/content/EditorCommands.js b/mozilla/editor/ui/composer/content/EditorCommands.js index e6a0063d087..26a6c61b644 100644 --- a/mozilla/editor/ui/composer/content/EditorCommands.js +++ b/mozilla/editor/ui/composer/content/EditorCommands.js @@ -57,11 +57,11 @@ function EditorOnLoad() { document.getElementById( "args" ).setAttribute( "value", window.arguments[0] ); } // Continue with normal startup. - EditorStartup( 'html' ); + EditorStartup( 'html', document.getElementById("content-frame")); return; } -function EditorStartup(editorType) +function EditorStartup(editorType, editorElement) { dump("Doing Editor Startup...\n"); contentWindow = window.content; @@ -70,9 +70,10 @@ function EditorStartup(editorType) window.addEventListener("load", EditorDocumentLoaded, true, false); dump("Trying to make an Editor Shell through the component manager...\n"); - var editorShell = Components.classes["component://netscape/editor/editorshell"].createInstance(); +/* var editorShell = Components.classes["component://netscape/editor/editorshell"].createInstance(); if (editorShell) editorShell = editorShell.QueryInterface(Components.interfaces.nsIEditorShell); + if (!editorShell) { dump("Failed to create editor shell\n"); @@ -80,9 +81,9 @@ function EditorStartup(editorType) window.close(); return; } - +*/ // store the editor shell in the window, so that child windows can get to it. - window.editorShell = editorShell; + var editorShell = window.editorShell = editorElement.editorShell; editorShell.Init(); editorShell.SetWebShellWindow(window); diff --git a/mozilla/editor/ui/composer/content/TextEditorAppShell.xul b/mozilla/editor/ui/composer/content/TextEditorAppShell.xul index a7278e78647..4fa595017d2 100644 --- a/mozilla/editor/ui/composer/content/TextEditorAppShell.xul +++ b/mozilla/editor/ui/composer/content/TextEditorAppShell.xul @@ -46,7 +46,7 @@ - + @@ -127,7 +127,7 @@ - + diff --git a/mozilla/suite/debugQA/content/debugQATextEditorShell.xul b/mozilla/suite/debugQA/content/debugQATextEditorShell.xul index a7278e78647..4fa595017d2 100644 --- a/mozilla/suite/debugQA/content/debugQATextEditorShell.xul +++ b/mozilla/suite/debugQA/content/debugQATextEditorShell.xul @@ -46,7 +46,7 @@ - + @@ -127,7 +127,7 @@ - +