facebookarchive / draft-js

A React framework for building text editors.
https://draftjs.org/
MIT License
22.57k stars 2.63k forks source link

Is it possible to create an entity using a regular expression? #2445

Open Luccasoli opened 4 years ago

Luccasoli commented 4 years ago

a question, is it possible to create an entity using a regular expression? (the entity would start with a # and end when typing a non-alphanumeric character)

aidanoconnor1 commented 4 years ago

did you find an answer to this questions?

Luccasoli commented 4 years ago

No :sob:

rahul1995 commented 4 years ago

Do you mean the decorator? Like a hashtag decorator to make it blue? Read this: https://draftjs.org/docs/advanced-topics-decorators#compositedecorator

Luccasoli commented 4 years ago

@rahul1995 No, I really want entities, I needed to save information associated with a string preceded by a "#"

hellodoli commented 3 years ago

@Luccasoli same question, I want entity with hashtag but I don't know how.