Skip to content

Commit

Permalink
keep query in ace editor after submitting
Browse files Browse the repository at this point in the history
  • Loading branch information
rametta committed Jun 20, 2021
1 parent b2476cf commit a6fb21b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/IHP/static/IDE/ihp-schemadesigner.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,13 @@ document.addEventListener('turbolinks:load', initTooltip);
function initQueryAce() {
var editorEl = document.getElementById('queryInput');
if (!editorEl) return;
ace.edit(editorEl).destroy();
var editor;
var editor = ace.edit(editorEl);
var existingValue = editor.getValue();
editor.destroy();
function initAce() {
ace.require("ace/ext/language_tools");
editor = ace.edit(editorEl);
editor.setValue(existingValue, 1);
editor.setTheme("ace/theme/solarized_dark");
editor.session.setMode("ace/mode/sql");
editor.setShowPrintMargin(false);
Expand Down

0 comments on commit a6fb21b

Please sign in to comment.