Update maxLines to 100 for all ace editors, this auto sizes the editors
This commit is contained in:
@@ -117,14 +117,13 @@
|
|||||||
<script>
|
<script>
|
||||||
var editor = ace.edit("editor");
|
var editor = ace.edit("editor");
|
||||||
editor.setOptions({
|
editor.setOptions({
|
||||||
maxLines: editor.session.getLength()
|
maxLines: 100
|
||||||
});
|
});
|
||||||
editor.setTheme("ace/theme/github_dark");
|
editor.setTheme("ace/theme/github_dark");
|
||||||
editor.session.setMode("ace/mode/javascript");
|
editor.session.setMode("ace/mode/javascript");
|
||||||
|
|
||||||
editor.session.$worker.send("changeOptions", [{ asi: true }]);
|
editor.session.$worker.send("changeOptions", [{ asi: true }]);
|
||||||
|
|
||||||
|
|
||||||
document.getElementById('executeBtn').addEventListener('click', function () {
|
document.getElementById('executeBtn').addEventListener('click', function () {
|
||||||
try {
|
try {
|
||||||
// Get the code from the editor
|
// Get the code from the editor
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
<script>
|
<script>
|
||||||
var editor_environment = ace.edit("editor-environment");
|
var editor_environment = ace.edit("editor-environment");
|
||||||
editor_environment.setOptions({
|
editor_environment.setOptions({
|
||||||
maxLines: 15, //editor_environment.session.getLength()
|
maxLines: 100
|
||||||
});
|
});
|
||||||
editor_environment.setTheme("ace/theme/github_dark");
|
editor_environment.setTheme("ace/theme/github_dark");
|
||||||
editor_environment.session.setMode("ace/mode/json");
|
editor_environment.session.setMode("ace/mode/json");
|
||||||
@@ -82,7 +82,7 @@
|
|||||||
<script>
|
<script>
|
||||||
var editor = ace.edit("editor");
|
var editor = ace.edit("editor");
|
||||||
editor.setOptions({
|
editor.setOptions({
|
||||||
maxLines: editor.session.getLength()
|
maxLines: 100
|
||||||
});
|
});
|
||||||
editor.setTheme("ace/theme/github_dark");
|
editor.setTheme("ace/theme/github_dark");
|
||||||
editor.session.setMode("ace/mode/javascript");
|
editor.session.setMode("ace/mode/javascript");
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
<script>
|
<script>
|
||||||
var editor = ace.edit("editor");
|
var editor = ace.edit("editor");
|
||||||
editor.setOptions({
|
editor.setOptions({
|
||||||
maxLines: editor.session.getLength()
|
maxLines: 100
|
||||||
});
|
});
|
||||||
editor.setTheme("ace/theme/github_dark");
|
editor.setTheme("ace/theme/github_dark");
|
||||||
editor.session.setMode("ace/mode/javascript");
|
editor.session.setMode("ace/mode/javascript");
|
||||||
|
|||||||
Reference in New Issue
Block a user