mirror of
https://github.com/vrana/adminer.git
synced 2025-08-07 23:27:17 +02:00
Unify textarea highlighting
This commit is contained in:
@@ -82,6 +82,7 @@ for (const el of qsa('textarea')) {
|
||||
}
|
||||
});
|
||||
setupSubmitHighlightInput(cm.getWrapperElement());
|
||||
el.onchange = () => cm.setValue(el.value);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@@ -59,17 +59,9 @@ const geminiText = qsl('textarea');
|
||||
const geminiButton = qsl('input');
|
||||
|
||||
function setSqlareaValue(value) {
|
||||
qs('textarea.sqlarea').value = value;
|
||||
const jushPre = qs('pre.sqlarea');
|
||||
if (jushPre) {
|
||||
jushPre.textContent = value;
|
||||
jushPre.oninput(); // syntax highlighting
|
||||
}
|
||||
const cmPre = qs('.CodeMirror');
|
||||
if (cmPre) {
|
||||
cmPre.CodeMirror.setValue(value);
|
||||
cmPre.CodeMirror.refresh();
|
||||
}
|
||||
const sqlarea = qs('textarea.sqlarea');
|
||||
sqlarea.value = value;
|
||||
sqlarea.onchange();
|
||||
}
|
||||
|
||||
geminiButton.onclick = () => {
|
||||
|
Reference in New Issue
Block a user