This commit is contained in:
Vanessa 2024-06-18 22:36:53 +08:00
parent cc5003549c
commit 5d051d0c64
10 changed files with 26 additions and 26 deletions

View file

@ -338,9 +338,9 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
}
}
let lastElement: Element;
let insertBefore = false
let insertBefore = false;
if (!range.toString() && insertByCursor) {
const positon = getSelectionOffset(blockElement, protyle.wysiwyg.element, range)
const positon = getSelectionOffset(blockElement, protyle.wysiwyg.element, range);
if (positon.start === 0 && editableElement.textContent !== "") {
insertBefore = true;
}