diff --git a/murom/murom_1.0.0.html b/murom/murom_1.0.0.html index a5ea551..f4257f2 100644 --- a/murom/murom_1.0.0.html +++ b/murom/murom_1.0.0.html @@ -78,7 +78,6 @@ padding: 1.5em 1em 1.5em 1em; */ } - #editor { width: 100%; @@ -192,18 +191,14 @@ this.LOG("Parameter key: '" + key + "' value: '" + value + "'"); } this.setupMode(); - if (this.mode == "preview") - { - this.setupPreviewUI(); - } - if (this.mode == "debug") - { - this.setupDebugUI(); - } if (this.mode == "editor") { this.setupEditorUI(); } + if (this.mode == "preview") + { + this.setupPreviewUI(); + } } Tool.prototype.setupDeps = function() { @@ -212,7 +207,21 @@ if (this.mode == "editor") { var self = this; - this.setupEditorMode(); + + this.LOG("Setup editor mode"); + // Initialize ACE editor. + this.editor = window.ace.edit("editor"); + // Set JavaScript language. + this.editor.session.setMode("ace/mode/javascript"); + + // Display script. + const zb64 = this.parameters["zipbase64"]; + if (zb64) + { + const script = zipBase64Decode(zb64); + this.editor.session.setValue(script); + } + this.loadIFrame(zb64); this.run.subscribe(function(){ self.runEditorScript(); }); @@ -225,10 +234,6 @@ { var self = this; this.LOG("Tool.setupGotov"); - if (this.mode == "debug") - { - this.setupDebugMode(); - } if (this.mode == "preview") { this.setupPreviewMode(); @@ -286,35 +291,18 @@ const mode = this.parameters["mode"]; if (mode) { - if (mode == "debug") - { - this.mode = "debug"; - return; - } - else if (mode == "preview") - { - this.mode = "preview"; - return; - } + if (mode == "preview") + { + this.mode = "preview"; + return; + } + } + else + { + this.mode = "editor"; } - this.mode = "editor"; - } - Tool.prototype.setupDebugMode = function() - { - this.LOG("Setup debug mode"); - this.executeScript(); - } - Tool.prototype.setupDebugUI = function() - { - document.body.innerHTML = - '