javascript - How to convert emoji's unicode into an image
PHP中文网
PHP中文网 2017-05-16 13:27:01
0
3
994

I am making a chat application, and now I have imported emoticons, but I have encountered a new problem, that is, I can only receive emoji Unicode codes when I send them. For example, if I receive a smiley face: smile:, then how do I convert it to Such. Is there anyone who has done such a project? Can you share your experience? Thank you in advance.

PHP中文网
PHP中文网

认证0级讲师

reply all(3)
伊谢尔伦

EmojiOne

SupportJS PHP Android iOS Javaetc

JS

https://github.com/Ranks/emojione/blob/master/lib/js

You also need to download the corresponding images or fonts https://www.emojione.com/deve...
放的位置Refer to the official examples

How to use

emojione.shortnameToImage(":see_no_evil:  or :'-) or emoji charset");

Supported formats

  • :emoji:, for example :see_no_evil: is that

  • pictograms, such as ':-)

  • unicode characters

漂亮男人

After js obtains the unicode character, it will perform regular filtering on it, convert it into the characters corresponding to the image name, and then assemble the image path so that it can be displayed

过去多啦不再A梦

weChatEmoji

rrrree

https://github.com/hu-qi/weCh...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template