diff --git a/docs/walkthroughs/03-defining-custom-elements.md b/docs/walkthroughs/03-defining-custom-elements.md index 8472ea5d8..26ab208fb 100644 --- a/docs/walkthroughs/03-defining-custom-elements.md +++ b/docs/walkthroughs/03-defining-custom-elements.md @@ -214,7 +214,7 @@ const App = () => { Transforms.setNodes( editor, { type: match ? 'paragraph' : 'code' }, - { match: n => Editor.isBlock(editor, n) } + { match: n => Element.isElement(n) && Editor.isBlock(editor, n) } ) } }}