Merge pull request #2702 from alexandrustefan/develop

code editor improvements
This commit is contained in:
Luis Fernando Molina authored and GitHub committed 2021-11-22 22:00:03 -04:00
commit c493e7249f
2 files changed
+7 -1

No files matched your search

@@ -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
@@ -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 () {