Vanessa 2022-10-10 22:36:57 +08:00
parent 289c5f1758
commit fe7f53c266

View file

@ -1242,6 +1242,11 @@ export class Gutter {
fetchPost("/api/block/getHeadingDeleteTransaction", {
id,
}, (response) => {
response.data.doOperations.forEach((operation: IOperation) => {
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.id}"]`).forEach((itemElement: HTMLElement) => {
itemElement.remove();
});
});
transaction(protyle, response.data.doOperations, response.data.undoOperations);
});
});
@ -1254,6 +1259,11 @@ export class Gutter {
fetchPost("/api/block/getHeadingDeleteTransaction", {
id,
}, (response) => {
response.data.doOperations.forEach((operation: IOperation) => {
protyle.wysiwyg.element.querySelectorAll(`[data-node-id="${operation.id}"]`).forEach((itemElement: HTMLElement) => {
itemElement.remove();
});
});
transaction(protyle, response.data.doOperations, response.data.undoOperations);
});
}