This commit is contained in:
Vanessa 2022-07-04 16:19:53 +08:00
parent 655667feff
commit a74e91a2dd

View file

@ -45,14 +45,6 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false) =>
return; return;
} }
let id = blockElement.getAttribute("data-node-id"); let id = blockElement.getAttribute("data-node-id");
if (range.toString() === "") {
// 连续粘贴 PDF 标注不生效 https://github.com/siyuan-note/siyuan/issues/3018
const fileAnnoElement = hasClosestByAttribute(range.startContainer, "data-type", "file-annotation-ref");
if (fileAnnoElement) {
range.setEndAfter(fileAnnoElement);
range.collapse(false);
}
}
range.insertNode(document.createElement("wbr")); range.insertNode(document.createElement("wbr"));
let oldHTML = blockElement.outerHTML; let oldHTML = blockElement.outerHTML;
if (range.toString() !== "") { if (range.toString() !== "") {