This commit is contained in:
parent
b86ed5b356
commit
27e902cae8
1 changed files with 4 additions and 4 deletions
|
@ -57,16 +57,16 @@ export const turnIntoTaskList = (protyle: IProtyle, type: string, blockElement:
|
|||
action: "delete",
|
||||
id: emptyId
|
||||
}], [{
|
||||
action: "update",
|
||||
id,
|
||||
data: oldHTML,
|
||||
}, {
|
||||
action: "move",
|
||||
id,
|
||||
previousID: newId,
|
||||
}, {
|
||||
action: "delete",
|
||||
id: newId
|
||||
}, {
|
||||
action: "update",
|
||||
id,
|
||||
data: oldHTML,
|
||||
}]);
|
||||
blockElement.outerHTML = `<div data-subtype="t" data-node-id="${newId}" data-type="NodeList" class="list" updated="${newId.split("-")[0]}"><div data-marker="*" data-subtype="t" data-node-id="${liItemId}" data-type="NodeListItem" class="li${isDone ? " protyle-task--done" : ""}" updated="${liItemId.split("-")[0]}"><div class="protyle-action protyle-action--task" draggable="true"><svg><use xlink:href="#icon${isDone ? "C" : "Unc"}heck"></use></svg></div>${blockElement.outerHTML}<div class="protyle-attr" contenteditable="false"></div></div><div class="protyle-attr" contenteditable="false"></div></div>`;
|
||||
focusByWbr(protyle.wysiwyg.element, range);
|
||||
|
|
Loading…
Add table
Reference in a new issue