mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-12 18:24:21 +01:00
This commit is contained in:
parent
1413457ab6
commit
218503ddee
5 changed files with 28 additions and 37 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import {hasClosestBlock, hasClosestByAttribute, hasClosestByClassName, hasClosestByTag} from "./hasClosest";
|
||||
import * as dayjs from "dayjs";
|
||||
import {transaction, updateTransaction} from "../wysiwyg/transaction";
|
||||
import {getContenteditableElement} from "../wysiwyg/getBlock";
|
||||
import {getContenteditableElement, getParentBlock} from "../wysiwyg/getBlock";
|
||||
import {
|
||||
fixTableRange,
|
||||
focusBlock,
|
||||
|
|
@ -545,7 +545,7 @@ export const insertHTML = (html: string, protyle: IProtyle, isBlock = false,
|
|||
data: oldHTML,
|
||||
id,
|
||||
previousID: blockElement.previousElementSibling ? blockElement.previousElementSibling.getAttribute("data-node-id") : "",
|
||||
parentID: blockElement.parentElement.getAttribute("data-node-id") || protyle.block.parentID
|
||||
parentID: getParentBlock(blockElement).getAttribute("data-node-id") || protyle.block.parentID
|
||||
});
|
||||
blockElement.remove();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue