Enable editor window to be opened via window.openDialog
git-svn-id: svn://10.0.0.236/trunk@47372 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
|
||||
<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="EditorOnLoad()"
|
||||
onunload="EditorShutdown()" title="&editorWindow.title;" align="vertical"
|
||||
width="640" height="480">
|
||||
|
||||
|
||||
@@ -49,6 +49,20 @@ var gStyleTags = {
|
||||
"underline" : "u"
|
||||
};
|
||||
|
||||
function EditorOnLoad() {
|
||||
// See if argument was passed.
|
||||
if ( window.arguments && window.arguments[0] ) {
|
||||
// Opened via window.openDialog with URL as argument.
|
||||
// Put argument where EditorStartup expects it.
|
||||
document.getElementById( "args" ).setAttribute( "value", window.arguments[0] );
|
||||
// Continue with normal startup.
|
||||
EditorStartup( 'html' );
|
||||
return;
|
||||
} else {
|
||||
// No problem, proceed the old-fashioned way.
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function EditorStartup(editorType)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user