Display "emoji keyboard" using Javascript, is it possible?

Asked

Viewed 247 times

5

In the latest versions of Google Chrome/Opera has a feature to select emoji, native browser.

This can be done by the user right-clicking and clicking on "Emoji" in some typing field (input/textarea...). This displays an emoji "keyboard", a box where you can select emojis.


Is there any way to display that same "keyboard" (this emoji check box) without the user’s right click?

The goal would be to create a button, which when clicked, would show the same "emoji keyboard" already present in the browser. I believe that for this it would be necessary some way to trigger such "keyboard" using Javascript.

1 answer

2

I don’t know a way to open the device’s native keyboard, but if no one points out a better answer, this Javascript library may be useful to you.

It adds a button in the text fields that allows selecting emojis.

https://github.com/OneSignal/emoji-picker

I hope I’ve helped.

  • The problem is that it requires external libraries, but one inclusive. In my case, the use of external libraries is being greatly avoided, the only existing external library is Google Analytics. I will not mark your reply as "best response" (although it may currently be considered the best alternative), because I believe that in the future some native API will be available for this feature, if there is no longer any way to activate such native keyboard.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.