jmadler / emoji-picker

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

How to reset the input? #15

Open philJohnson opened 8 years ago

philJohnson commented 8 years ago

I'm using sockets to send messages. On form submit I clear the text area. How do I update the emoji div?

I also change the placeholder text depending on certain selections in the form I'd like to force update that for the content.

curbsaleem commented 8 years ago

+1

ailinal commented 8 years ago

+1

bachors commented 7 years ago

Try this element.val(""); $('.emoji-wysiwyg-editor').html("");

egaviriarestrepo commented 7 years ago
  $('#input').val("")
  $('.emoji-wysiwyg-editor').empty();
phomlish commented 6 years ago

totally not working

mauropucci commented 6 years ago

I solved with document.location.href to call the same page but not reloading it

yanshinian commented 5 years ago

dynamic change like this code:

$(".emoji-wysiwyg-editor").empty() // empty div window.emojiPicker.appendUnicodeAsImageToElement($(".emoji-wysiwyg-editor"),"text value") // translate your unicode string to html code fill the div $(".emoji-wysiwyg-editor").css("white-space", "pre-wrap") //keep origin string word wrap;