Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Ensure block transformation works in the example (#5803)
I noticed that the current example for toggling a code block using the backtick (`) key doesn't work as expected. The issue occurs because `Editor.nodes()` can return text nodes instead of block elements, causing`Transforms.setNodes()` to fail. To fix this, I added an extra check using `Element.isElement(n)`, ensuring that only block elements are transformed.
- Loading branch information