mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
ed92f9147c
commit
6cba470b69
1 changed files with 2 additions and 1 deletions
|
|
@ -54,7 +54,8 @@ export const insertEmptyBlock = (protyle: IProtyle, position: InsertPosition, id
|
|||
const parentOldHTML = blockElement.parentElement.outerHTML;
|
||||
const newId = newElement.getAttribute("data-node-id");
|
||||
blockElement.insertAdjacentElement(position, newElement);
|
||||
if (blockElement.getAttribute("data-type") === "NodeListItem" && blockElement.getAttribute("data-subtype") === "o") {
|
||||
if (blockElement.getAttribute("data-type") === "NodeListItem" && blockElement.getAttribute("data-subtype") === "o" &&
|
||||
!newElement.parentElement.classList.contains("protyle-wysiwyg")) {
|
||||
updateListOrder(newElement.parentElement, orderIndex);
|
||||
updateTransaction(protyle, newElement.parentElement.getAttribute("data-node-id"), newElement.parentElement.outerHTML, parentOldHTML);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue