signavio / react-mentions

@mention people in a textarea
https://react-mentions.vercel.app
Other
2.4k stars 560 forks source link

How can I apply conditional formatting to the mentioned words? #713

Open malavshah9 opened 10 months ago

malavshah9 commented 10 months ago

Steps to reproduce:

How can I apply conditional formatting to the mentioned words?


Use Case:

Suppose, I have tagged 10 different people from the suggestion list in input. Now fired the submit button. After that got to know from the backend that some of the mentioned users are not allowed to be mentioned. So wanted to show some visual effects like (the background color changed to red only for the invalid users-mentions) to the end user to remove those invalid mentioned users.

Expected behaviour:

Observed behaviour: Currently, whatever APIs are exposed, I am not able to apply conditional formatting to the mentioned words.

Workaround: Not found yet.