像这样,我的功能正常运行:
$(".textarea").on("change keyup paste", function (){
console.log("something happens");
});
但是,当我想将它应用到我的wysihtml5时,它不再起作用..
$('.textarea').wysihtml5();
$(".textarea").on("change keyup paste", function (){
console.log("something happens");
});
答案 0 :(得分:1)
工作解决方案:
$('.textarea').wysihtml5({
events: {
load: function() {
var some_wysi = $('.textarea').data('wysihtml5').editor;
$(some_wysi.composer.element).bind('keyup', function(){
console.log("something happens");
});
}
}
});