2

I'm using emojionearea inside my application. Since this plugin hides original textarea and uses div instead to show and load emojis, it causes problems in executing events like onkeyup and onkeypress. Here is my code:

<textarea id="Message" class="form-control" cols="80" rows="7" onchange="SMSCounter(this, event, in_array([], "Source"))" onblur="RefineCounter(this, in_array([], "Source"))" onkeypress="SetChar(event)" onkeyup="SMSCounter(this, event, in_array([], "Source"))" maxlength="765" style="width: 350px; height: 100px; float: right; display: none;" name="data[Message]" data-rel="tmplButton-solh0ecqbs"></textarea>
JustLearning
  • 3,164
  • 3
  • 35
  • 52
Fatemeh Rostami
  • 1,047
  • 1
  • 15
  • 27

1 Answers1

1

You can use the events in options for your area like this:

$("selector").emojioneArea({
  events: {
    keyup: function (editor, event) {
     console.log('event:keyup');
    },
    keydown: function (editor, event) {
      console.log('event:keydown');
    }
  }
)
Michael
  • 128
  • 6