diff --git a/Projects/Foundations/UI/Spaces/CodeEditor-Space/CodeEditorSpace.js b/Projects/Foundations/UI/Spaces/CodeEditor-Space/CodeEditorSpace.js index 88e678a51..d0c34bde5 100644 --- a/Projects/Foundations/UI/Spaces/CodeEditor-Space/CodeEditorSpace.js +++ b/Projects/Foundations/UI/Spaces/CodeEditor-Space/CodeEditorSpace.js @@ -123,7 +123,7 @@ function newFoundationsCodeEditorSpace() { } function resize() { - thisObject.container.frame.width = 1000 + thisObject.container.frame.width = 900 thisObject.container.frame.height = browserCanvas.height // - TOP_SPACE_HEIGHT thisObject.container.frame.position.x = browserCanvas.width thisObject.container.frame.position.y = 0 // TOP_SPACE_HEIGHT diff --git a/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js b/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js index 4408e4ed2..1580e85e2 100644 --- a/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js +++ b/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js @@ -85,6 +85,10 @@ function newFoundationsCodeEditorEditorPage() { } createCurrentEditorModel() + // Ensure proper code formatting + monacoEditor.getAction('editor.action.formatDocument').run(); + + } @@ -99,6 +103,8 @@ function newFoundationsCodeEditorEditorPage() { payload.node.code = monacoEditor.getValue() }) } else if (thisObject.editorType === codeEditorType.CONFIG) { + + // monacoEditor.setModel(monaco.editor.createModel(JSON.stringify(payload.node.config, null, 4), "json")) monacoEditor.setModel(monaco.editor.createModel(payload.node.config, "json")) //Update config values monacoEditor.getModel().onDidChangeContent(function () {