codex-team / codex-team/editor.js
[Bug] Splitting a block does not create "block-changed" event on the source block.
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Describe a bug.
If I click enter in somewhere in the block, a new block gets created from the caret position.
However for the source block which got split, does not get a "block-changed" event.
Steps to reproduce:
1. Go to … Add some text to paragraph block.
2. Click on … Click enter somewhere in middle of the text. A new block with content from the caret position get created
3. …
Expected behavior:
- Block Added event for new block. ✅
- Block Changed event for the block which got split. ❌
From the source code, only a insert operation is invoked which results in "block-added" event.
https://github.com/codex-team/editor.js/blob/43032ebaac6a8b9a67c9bf2ada5adc0f8592d546/src/components/modules/blockManager.ts#L479
Screenshots:
Device, Browser, OS:
Editor.js version:
2.26.4
Plugins you use with their versions:
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.