mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 04:06:00 +00:00
html & xml autio select highlighter #485
This commit is contained in:
@@ -40,6 +40,14 @@
|
|||||||
onMount(() => {
|
onMount(() => {
|
||||||
editor.getEditor().focus();
|
editor.getEditor().focus();
|
||||||
if (safeJsonParse(textValue)) syntaxMode = 'json';
|
if (safeJsonParse(textValue)) syntaxMode = 'json';
|
||||||
|
if (textValue.match(/<\/[a-zA-z0-9-]+\s*>/)) {
|
||||||
|
// end tag
|
||||||
|
if (textValue.match(/<\/(div|span|h[0-6]|p|input|a)\s*>/)) {
|
||||||
|
syntaxMode = 'html';
|
||||||
|
} else {
|
||||||
|
syntaxMode = 'xml';
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleKeyDown(ev) {
|
function handleKeyDown(ev) {
|
||||||
|
|||||||
Reference in New Issue
Block a user