TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.

Home Page:https://www.blocknotejs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot read properties of undefined (reading 'renderToElement')

boyanhtrai opened this issue · comments

Describe the bug
Cannot read properties of undefined (reading 'renderToElement')

To Reproduce
I just test on example link on https: //www.blocknotejs.org/docs/custom-schemas/custom-inline-content
Link bug example: https://stackblitz.com/github/TypeCellOS/BlockNote/tree/main/examples/05-custom-schema/02-suggestion-menus-mentions?file=App.tsx

image

version: ^0.13.2
Misc

  • Node version: v20.11.0
  • Package manager:
  • Browser: chrome

I'm also running into this one after creating custom inline content

image

Playing around with the example project I noticed the inline content example consistently crashes when switching between certain examples and not others (see clip below)

Screen.Recording.2024-05-30.at.16.30.17.mov

It seems contentComponent on _tiptapEditor is undefined in some cases.

EDIT: Perhaps there's some race condition here. Sometimes the example with custom inline content renders and sometimes it crashes due to the error mentioned above.

I'm keeping this open as #788 was a temp workaround that should not be necessary