mirror of
https://github.com/dbgate/dbgate
synced 2024-11-23 00:43:10 +00:00
html & xml autio select highlighter #485
This commit is contained in:
parent
87c29faadd
commit
a3db8e2903
@ -40,6 +40,14 @@
|
||||
onMount(() => {
|
||||
editor.getEditor().focus();
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user