diff --git a/editor/ui/composer/content/EditorCommands.js b/editor/ui/composer/content/EditorCommands.js index 9fe548f5d40..4bc40d54d1a 100644 --- a/editor/ui/composer/content/EditorCommands.js +++ b/editor/ui/composer/content/EditorCommands.js @@ -12,12 +12,17 @@ * * The Initial Developer of this code under the NPL is Netscape * Communications Corporation. Portions created by Netscape are - * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Copyright (C) 1998-1999 Netscape Communications Corporation. All Rights * Reserved. + * + * Contributors: + * Sammy Ford */ /* Main Composer window UI control */ +var EdAppCore = null; +var EdAppCoreName = ""; var toolbar; var documentModified; var EditorDisplayStyle = true; @@ -357,6 +362,23 @@ function EditorShowClipboard() // --------------------------- View menu --------------------------- +function EditorViewSource() +{ + var toolkitCore = XPAppCoresManager.Find("ToolkitCore"); + if (!toolkitCore) { + toolkitCore = new ToolkitCore(); + if (toolkitCore) { + toolkitCore.Init("ToolkitCore"); + } + } + if (toolkitCore) { + var url = window.content.location; + dump("Opening view of source for" + url + "\n"); + toolkitCore.ShowWindowWithArgs("chrome://editor/content/viewSource.xul", window, url); + } +} + + function EditorSetDocumentCharacterSet(aCharset) { dump(aCharset);