mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
Unify textarea highlighting
This commit is contained in:
@@ -46,6 +46,10 @@ function syntaxHighlighting(version, vendor) {
|
||||
const pre = jush.textarea(tag);
|
||||
if (pre) {
|
||||
setupSubmitHighlightInput(pre);
|
||||
tag.onchange = () => {
|
||||
pre.textContent = tag.value;
|
||||
pre.oninput();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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