emoji-picker icon indicating copy to clipboard operation
emoji-picker copied to clipboard

How to reset the input?

Open philJohnson opened this issue 9 years ago • 7 comments

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.

philJohnson avatar Feb 08 '16 02:02 philJohnson

+1

curbsaleem avatar Feb 24 '16 08:02 curbsaleem

+1

ailinal avatar Aug 04 '16 04:08 ailinal

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

bachors avatar May 01 '17 17:05 bachors

  $('#input').val("")
  $('.emoji-wysiwyg-editor').empty();

egaviriarestrepo avatar Aug 03 '17 15:08 egaviriarestrepo

totally not working

phomlish avatar Nov 17 '17 09:11 phomlish

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

mauropucci avatar Jun 26 '18 20:06 mauropucci

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;

yanshinian avatar Feb 12 '19 10:02 yanshinian