Bind Paste Function to JQuery Text Editor

443 Views Asked by At

Can anybody tell me why I get no output from this function?

$('.jqte_editor').bind('paste', function() {
    console.log("hi")
});

I have also tried on(

$('.jqte_editor').on('paste', function() {
    console.log("hi")
});

HTML:

<textarea class="jqte" style="margin-bottom: -20px;" rows="50" cols="50" name="body" id="body"></textarea>

Rendered HTML:

enter image description here

1

There are 1 best solutions below

0
On

Try this.

$(document).on("paste", ".jqte_editor", function(e) {

//Do here what you want.

});