mirror of
https://github.com/codex-team/editor.js
synced 2026-03-15 15:15:47 +01:00
fix: split custom event
Add custom event of changes when block is split.
This commit is contained in:
parent
9ae96b9e17
commit
bb33901657
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue