fix(mark-range): The internal nodes of the card will cause the id to be lost

This commit is contained in:
yanmao 2021-12-30 00:36:51 +08:00
parent ac6a258da8
commit 012771fccc
2 changed files with 5 additions and 1 deletions

View File

@ -246,7 +246,7 @@ class Scrollbar extends EventEmitter2 {
this.reRenderY(scrollTop);
}
},
50,
0,
{ leading: true },
);

View File

@ -405,6 +405,10 @@ export default class<T extends MarkRangeOptions> extends MarkPlugin<T> {
if (cardComponent && cardComponent.onChange)
cardComponent.onChange('local', cardComponent.root);
}
const cardComponent = this.editor.card.find(mark);
if (cardComponent && cardComponent.executeMark) {
cardComponent.executeMark(mark.clone(), false);
}
});
this.#isApply = true;
}