This commit is contained in:
Vanessa 2022-09-14 23:26:02 +08:00
parent fc932b0065
commit 7e164623cb
14 changed files with 48 additions and 42 deletions

View file

@ -54,9 +54,11 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false) =>
if (inlineMathElement) {
// 表格内选中数学公式 https://ld246.com/article/1631708573504
inlineMathElement.remove();
} else if (range.startContainer.nodeType === 3 && range.startContainer.parentElement.getAttribute("data-type") === "block-ref") {
} else if (range.startContainer.nodeType === 3 && range.startContainer.parentElement.getAttribute("data-type").indexOf("block-ref")>-1) {
// ref 选中处理 https://ld246.com/article/1629214377537
range.startContainer.parentElement.remove();
// 选中 ref**bbb** 后 alt+[
range.deleteContents();
} else {
range.deleteContents();
}