springload / draftail

📝🍸 A configurable rich text editor built with Draft.js

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is the entityTypes prop required?

htimsekim opened this issue · comments

commented

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.