Add a slick emoji selector to input fields and textareas on your website.
Add a slick emoji selector to input fields and textareas on your website.
:heart_eyes: :stuck_out_tongue_winking_eye: :joy: :stuck_out_tongue: Instantly add Emoji support to input fields on your website! :boom: :sparkles: :thumbsup: :metal:
lib/css path to match yours.
lib/js path to match yours.
On any input field, add the data attribute data-emojiable="true".
Put your input field in a container with class="emoji-picker-container" to make sure picker would be displayed upper right corner of the input field.
Create a new EmojiPicker instance and bind it to your input field.
I want the Emoji selector to input Unicode characters instead of images
Add data-emoji-input="unicode" to your input field. Only the unicode value is checked for; entering anything else has no effect.
I want to limit my input field to a certain number of characters (maxlength)
The maxlength property is supported. Character input and emoji input each count as one character, so it'll stop you from entering more than the max length.
I want classes from my original input field to be copied over to the rich emoji input area
They are!
new EmojiPicker().discover(), all elements with the data attribute data-emojiable="true" are found, a contenteditable div is created after each one, and the original input field is hidden.element.val() on the underlying hidden input field. The `` emojis will be converted into Unicode emojis (plain text)This was originally built to power emoji selection for OneSignal, an omni-channel customer engagement platform.
This is a slightly modified version of angular-emoji-popup, which was written based on jquery-emojiarea (converts input fields to rich emoji input areas) and uses nanoScrollerJs (for the popup's custom-skinned scrollbar). This version removes AngularJS as a dependency.
maxlength property of input fields is respected (emoji selections count as a single character)No open issues yet, or sync has not completed.