springload / draftail

📝🍸 A configurable rich text editor built with Draft.js
https://www.draftail.org/
MIT License
608 stars 68 forks source link

Is the entityTypes prop required? #455

Open htimsekim opened 1 year ago

htimsekim commented 1 year ago

I'm just trying to insert a pretty basic editor into a page. The users won't need to post any entities so I'm happy ignoring that functionality, but whenever I leave the entityTypes prop out of my DraftailEditor component I get an error in the console saying entityType is undefined. I've tried using what I understand to be the built-in entityTypes of LINK and IMAGE from ENTITY_TYPES. This gets the component to render but if you click on either of the buttons the presences of those entityTypes provide, it crashes. I've seen some demo implementations on other sites that ignore this prop, but I'm not sure how they're doing it.