Fixes and refactors
This commit is contained in:
@@ -17274,7 +17274,6 @@
|
||||
|
||||
if (document.queryCommandSupported('insertText')) {
|
||||
document.execCommand('insertText', false, text);
|
||||
highlightSyntax(editorEle.id);
|
||||
} else {
|
||||
// Insert text at the current position of caret
|
||||
const range = document.getSelection().getRangeAt(0);
|
||||
@@ -17288,9 +17287,8 @@
|
||||
const selection = window.getSelection();
|
||||
selection.removeAllRanges();
|
||||
selection.addRange(range);
|
||||
|
||||
|
||||
}
|
||||
highlightSyntax(editorEle.id);
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user