mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
This commit is contained in:
parent
5287e86ca8
commit
81e5bdc32a
1 changed files with 5 additions and 1 deletions
|
|
@ -215,9 +215,13 @@ export const removeBlock = (protyle: IProtyle, blockElement: Element, range: Ran
|
|||
}
|
||||
}
|
||||
} else {
|
||||
let data = topElement.outerHTML; // 不能 spin ,否则 li 会变为 list
|
||||
if (topElement.classList.contains("render-node") || topElement.querySelector("div.render-node")) {
|
||||
data = protyle.lute.SpinBlockDOM(topElement.outerHTML); // 防止图表撤销问题
|
||||
}
|
||||
inserts.push({
|
||||
action: "insert",
|
||||
data: protyle.lute.SpinBlockDOM(topElement.outerHTML), // 防止图标撤销问题
|
||||
data,
|
||||
id,
|
||||
previousID: topElement.previousElementSibling ? topElement.previousElementSibling.getAttribute("data-node-id") : "",
|
||||
parentID: topElement.parentElement.getAttribute("data-node-id") || protyle.block.parentID
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue