0

I'm using draft-js in a chat client that I am building. I have created a custom entity that allows users to "@" mention other users. If a user is "@" mentioned, I want to send them a notification. Is there a way in draft-js to query the current editor state and ask if there are any entities matching a certain type? It would be nice if I could get data about that entity as well.

nicksrandall
  • 3,008
  • 2
  • 12
  • 9

1 Answers1

0

please check the official tweet example. The {props.children} of your custom component will help you get the mentioned.

Jiang YD
  • 3,205
  • 1
  • 14
  • 20