BlockNote
BlockNote copied to clipboard
Enter Key Breaks Children in Custom Toggleable Blocks
Describe the bug When pressing Enter inside a custom toggleable block, the children are broken unexpectedly.
- If the cursor is on the toggle title, all children should be preserved, but they are not.
- If the cursor is inside the children, pressing Enter should move the cursor to the next child (if it exists) or create a new default block.
To Reproduce
- Open the example: https://www.blocknotejs.org/examples/custom-schema/toggleable-blocks
- Place the cursor in the toggle title and press
Enter. - Observe that the children are broken.
Misc
- Node version: 22.13.0
- Package manager: npm
- Browser: Firefox
- [ ] I'm a sponsor and would appreciate if you could look into this sooner than later 💖
https://github.com/user-attachments/assets/eb85ca78-7b74-497d-944e-27017ba6f675