jmadler / emoji-picker

Add a slick emoji selector to input fields and textareas on your website.
Other
1.32k stars 318 forks source link

From a string with unicode to imsges #111

Open mauropucci opened 6 years ago

mauropucci commented 6 years ago

As in the title i saved on db a string text with unicodes. Now i show it back on the web in a page site i would like to have again all the images saved in it.

How can i parse a string and convert all the unicodes back to images to show them in the correct way ?

Thanks

Gexa commented 6 years ago

+1

DangerD256 commented 6 years ago

+2

dominicklee commented 4 years ago

Alright guys, I had the same request and need. To convert the unicode versions back into the same images you see in the Picker, you can do:

window.emojiPicker.appendUnicodeAsImageToElement($("#yourDivID"),"😃")

Replace yourDivID with whatever the id of your element. You can also use getElementByID('yourDivID') instead.

Hope this helps someone!

MuhammadElmahi commented 4 years ago

@mauropucci did you found any solution !?