mirror of
https://github.com/vrana/adminer.git
synced 2025-08-10 00:28:34 +02:00
Syntax highlighting: Hook AJAX
This commit is contained in:
@@ -56,13 +56,15 @@ function getCmMode(el) {
|
||||
}
|
||||
}
|
||||
|
||||
for (const el of qsa('code')) {
|
||||
adminerHighlighter = els => els.forEach(el => {
|
||||
const mode = getCmMode(el);
|
||||
if (mode) {
|
||||
el.classList.add('cm-s-default');
|
||||
CodeMirror.runMode(el.textContent, mode, el);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
adminerHighlighter(qsa('code'));
|
||||
|
||||
for (const el of qsa('textarea')) {
|
||||
const mode = getCmMode(el);
|
||||
|
Reference in New Issue
Block a user