Fixes and refactors

This commit is contained in:
2023-04-26 11:43:44 +02:00
parent e308323962
commit 74f29035fa
5 changed files with 44 additions and 16 deletions

View File

@@ -241,6 +241,7 @@
if (document.queryCommandSupported('insertText')) {
document.execCommand('insertText', false, text);
} else {
// Insert text at the current position of caret
const range = document.getSelection().getRangeAt(0);
@@ -255,6 +256,7 @@
selection.removeAllRanges();
selection.addRange(range);
}
highlightSyntax(editorEle.id);
});
</script>
</body>