Update maxLines to 100 for all ace editors, this auto sizes the editors

This commit is contained in:
Peter Stockings
2023-12-18 22:39:21 +11:00
parent 4b0c356cda
commit 17f98195a2
3 changed files with 4 additions and 5 deletions

View File

@@ -117,14 +117,13 @@
<script>
var editor = ace.edit("editor");
editor.setOptions({
maxLines: editor.session.getLength()
maxLines: 100
});
editor.setTheme("ace/theme/github_dark");
editor.session.setMode("ace/mode/javascript");
editor.session.$worker.send("changeOptions", [{ asi: true }]);
document.getElementById('executeBtn').addEventListener('click', function () {
try {
// Get the code from the editor

View File

@@ -53,7 +53,7 @@
<script>
var editor_environment = ace.edit("editor-environment");
editor_environment.setOptions({
maxLines: 15, //editor_environment.session.getLength()
maxLines: 100
});
editor_environment.setTheme("ace/theme/github_dark");
editor_environment.session.setMode("ace/mode/json");
@@ -82,7 +82,7 @@
<script>
var editor = ace.edit("editor");
editor.setOptions({
maxLines: editor.session.getLength()
maxLines: 100
});
editor.setTheme("ace/theme/github_dark");
editor.session.setMode("ace/mode/javascript");