This commit is contained in:
Vanessa 2023-04-22 19:22:53 +08:00
parent dce6444b97
commit 820a51e5c2
4 changed files with 11 additions and 13 deletions

View file

@ -34,7 +34,7 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
let id = blockElement.getAttribute("data-node-id");
range.insertNode(document.createElement("wbr"));
let oldHTML = blockElement.outerHTML;
const isNodeCodeBlock = blockElement.getAttribute("data-type") === "NodeCodeBlock"
const isNodeCodeBlock = blockElement.getAttribute("data-type") === "NodeCodeBlock";
if (!isBlock &&
(isNodeCodeBlock || protyle.toolbar.getCurrentType(range).includes("code"))) {
range.deleteContents();