cesarwbr / react-input-emoji

A React input with an option to pick emojis 😍 😜 πŸ˜‚ πŸ˜›
https://cesarwbr.github.io/react-input-emoji/
MIT License
121 stars 64 forks source link

How to programmatically append emoji #47

Open ptahchiev opened 1 year ago

ptahchiev commented 1 year ago

Hello, what i'm trying to do is replace the pseudo emojis the user is typing with real ones. For example i want to replace :) with πŸ˜€ as the user types. In my onChange function I can check if the user has entered :) and then instead I want to append the emoji, but seems like there's no way to invoke it programmatically. Is there any API exposed for us? If not then can you please add it.

xNevrroXx commented 10 months ago

Just try to use another package. Example: interweave

But I ran into the following problem when trying to programmatically apply text containing emojis: The text is applied, but the emojis are not recognized, and instead there is an empty space, more precisely, an image without CSS styles. Just try to paste into the message state the following value: the text and some emojis🫣🀀🀧🫀