jmadler / emoji-picker

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

version 1.1.5 issues #89

Open phomlish opened 6 years ago

phomlish commented 6 years ago

1 The release is labeled 1.2.0 but is actually 1.1.5

2 README.md says use:

element.val() but text() is what works for me: theMessage = $(".emoji-wysiwyg-editor").text();

3 Documentation should detail how to deal with pressing enter. I fought with this for a while, especially those br's inside divs. Keydown was processed before emoji-picker did, so those br's were added after I tried to clear them. Here is what worked:

$('.emoji-wysiwyg-editor').on('keyup', function (e) { if(e.keyCode === 13) { sendChat(); } }); And sendChat should clear the text box: $('.emoji-wysiwyg-editor').empty();