fix: split custom event

Add custom event of changes when block is split.
This commit is contained in:
Alexander Chernyaev 2023-04-06 13:21:36 +03:00
commit bb33901657

View file

@ -527,6 +527,11 @@ export default class BlockManager extends Module {
*/
public split(): Block {
const extractedFragment = this.Editor.Caret.extractFragmentFromCaretPosition();
this.blockDidMutated(BlockMutationType.Changed, this.currentBlock, {
index: this.currentBlockIndex,
});
const wrapper = $.make('div');
wrapper.appendChild(extractedFragment as DocumentFragment);