summernote onKeyup event doesn't work as expected

Viewed 4132

I have summernote editor applied to a textarea and I would like that when I type some text in the editor, that text should be reflected in a div, so I have a textarea and a div#result where the changes should be written on every keyup event :

<textarea class="description"></textarea>

<br>

<div id="result">Text should change here</div>

I am using the callback onKeyup :

$('.description').summernote({
  callbacks: {
    onKeyup: function(e) {
      $("#result").html($('.description').val());
    }
  }
});

Here is the jsfiddle for the demo purpose:

https://jsfiddle.net/vLdhpx5t/1/

When I type some continuous text, the content doesn't change in the div or at least it doesn't change exactly to match the content of my summernote editor

1 Answers
Related