I have to use here jquery keyup to detect if user enter any text or not, but my problem is if user use paste the text using mouse, it won\'t be able to dete
In this particular situation enough will be just bind to the input event:
$('textarea').bind("input", function() {});
Apparently there are some situations where jQuery doesn't work for pasting. You might need to bind to several events as shown in following reference to catch users pasting contents accurately.
From Soliciting Fame - jQuery keyup vs bind - (from way-back machine)
// detect the change
$('input#myId').bind("change keyup input",function() {
// handle events here
});