mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
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
This commit is contained in:
parent
9aedc1b4f1
commit
3aaa2be0d7
@ -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);
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
<!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs -->
|
||||
<broadcaster id="dialog.start" ready="false"/>
|
||||
<observes element="dialog.start" attribute="ready" onbroadcast="EditorStartup('text')"/>
|
||||
<observes element="dialog.start" attribute="ready" onbroadcast="EditorStartup('text', document.getElementById('content-frame'))"/>
|
||||
|
||||
<!-- broadcaster nodes are appended here from the overlays -->
|
||||
<broadcasterset id="broadcasterset">
|
||||
@ -127,7 +127,7 @@
|
||||
|
||||
</toolbox>
|
||||
|
||||
<html:iframe type="content-primary" id="content-frame" src="about:blank" flex="100%"/>
|
||||
<editor type="content-primary" id="content-frame" src="about:blank" flex="100%"/>
|
||||
|
||||
<!-- status bar, from editorOverlay.xul -->
|
||||
<box id="EditorStatusBar" />
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
<!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs -->
|
||||
<broadcaster id="dialog.start" ready="false"/>
|
||||
<observes element="dialog.start" attribute="ready" onbroadcast="EditorStartup('text')"/>
|
||||
<observes element="dialog.start" attribute="ready" onbroadcast="EditorStartup('text', document.getElementById('content-frame'))"/>
|
||||
|
||||
<!-- broadcaster nodes are appended here from the overlays -->
|
||||
<broadcasterset id="broadcasterset">
|
||||
@ -127,7 +127,7 @@
|
||||
|
||||
</toolbox>
|
||||
|
||||
<html:iframe type="content-primary" id="content-frame" src="about:blank" flex="100%"/>
|
||||
<editor type="content-primary" id="content-frame" src="about:blank" flex="100%"/>
|
||||
|
||||
<!-- status bar, from editorOverlay.xul -->
|
||||
<box id="EditorStatusBar" />
|
||||
|
Loading…
Reference in New Issue
Block a user