diff --git a/Platform/WebServer/css/code-editor.css b/Platform/WebServer/css/code-editor.css index 5a735d4d1..c030c8170 100644 --- a/Platform/WebServer/css/code-editor.css +++ b/Platform/WebServer/css/code-editor.css @@ -5,8 +5,8 @@ margin: 20 25 20 30px; } -.editor { - height: 100vh; +.editor{ + height: 70vh; overflow: hidden; } diff --git a/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js b/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js index 5b91e1a31..4198e3782 100644 --- a/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js +++ b/Projects/Foundations/UI/Spaces/CodeEditor-Space/EditorPage.js @@ -55,6 +55,8 @@ function newFoundationsCodeEditorEditorPage() { function initMonacoEditor() { if (monacoEditor === undefined) { + document.getElementById('no-content').remove() + document.getElementById('code-path').insertAdjacentHTML('afterend',`
Notes: Changes are saved automatically
`) monacoEditor = monaco.editor.create(document.querySelector('#editor'), { model: null, theme: 'vs-dark', @@ -349,8 +351,8 @@ function newFoundationsCodeEditorEditorPage() { HTML += '' HTML += `

Code Editor

` HTML += `
` - HTML += `
Notes: Changes are saved automatically
` - HTML += `
` + HTML += `

Nothing to edit...

Try opening a node config or node code

` + HTML += '
' HTML += `` HTML += footer() document.getElementById('code-editor-content-div').innerHTML = HTML @@ -399,8 +401,9 @@ function newFoundationsCodeEditorEditorPage() { nodePathString += `` } }) - - document.getElementById("code-path").innerHTML = `Editing node: ` + nodePathString + if (nodePathString !== '') { + document.getElementById("code-path").innerHTML = `Editing node: ` + nodePathString + } function parentNodeRecursive(node, output) { if (node.payload.parentNode !== undefined) {