Undo/Redo in dialogs

 From:  ttype (STRUBE)
7286.6 
I got it!

Because codemirror has its' own undo/redo functionality objects can be added to commandbar like in FullScreen.js and then I simply set up a new shortcut for CTRL+Z and Y that checks if the editor has focus.
code:
var cb = moi.ui.getUIPanel('moi://ui/CommandBar.htm');
cb.consoleDoc = document;
cb.editor = editor;

$(window).unload(function() {
    delete cb.consoleDoc;
    delete cb.editor;
});

code:
var cb = moi.ui.getUIPanel('moi://ui/CommandBar.htm');

if (cb.consoleDoc && cb.consoleDoc.hasFocus()) {
    cb.editor.undo()
} else {
    moi.command.undo();
}

So now there is a small script console with syntax highlighting, line numbers, undo/redo and bracket matching. Still not too much, but it can be found here: https://github.com/thetumbledtype/moi3d-scripts-other/blob/master/ScriptConsole.htm

EDITED: 3 Mar 2015 by STRUBE