add:   try { gSourceContentWindow = document.getElementById("content-source"); gSourceContentWindow.makeEditable("text", false); gSourceTextEditor = gSourceContentWindow.getEditor(gSourceContentWindow.contentWindow); gSourceTextEditor.QueryInterface(Components.interfaces.nsIPlaintextEditor); gSourceTextEditor.enableUndo(false); gSourceTextEditor.rootElement.style.fontFamily = "-moz-fixed"; gSourceTextEditor.rootElement.style.whiteSpace = "pre"; gSourceTextEditor.rootElement.style.margin = 0; var controller = Components.classes["@mozilla.org/embedcomp/base-command-controller;1"] .createInstance(Components.interfaces.nsIControllerContext); controller.init(null); controller.setCommandContext(gSourceContentWindow); gSourceContentWindow.contentWindow.controllers.insertControllerAt(0, controller); var commandTable = controller.QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIControllerCommandTable); commandTable.registerCommand("cmd_find",        nsFindCommand); commandTable.registerCommand("cmd_findNext",    nsFindAgainCommand); commandTable.registerCommand("cmd_findPrev",    nsFindAgainCommand); } catch (e) { dump("makeEditable failed: "+e+"\n"); } 
context: 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] );    }    // get default character set if provided    if ("arguments" in window && window.arguments.length > 1 && window.arguments[1]) {      if (window.arguments[1].indexOf("charset=") != -1) {        var arrayArgComponents = window.arguments[1].split("=");        if (arrayArgComponents) {          // Put argument where EditorStartup expects it.          document.getElementById( "args" ).setAttribute("charset", arrayArgComponents[1]);        }      }    }    window.tryToClose = EditorCanClose;    // Continue with normal startup.    EditorStartup();}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/da612cac58dcb7e9f3602cece16f98855cac775c/editor.js/buggy/editor/ui/composer/content/editor.js