Reputation:
I am trying to set maximum character length for an jwysiwyg text editor.
I tried to use .keyup function. But its not working. I am using
dwr.util.getValue("jwysiwyg") //Its a dwr utility to get the value of an element.
to get the content of the text editor. jwysiwyg is the id of text area. Its working.
But if i try to use the same id like,
$("#jwysiwyg").keyup(this.countChars);
Its not working.
Is there any other way to get the .keyup event of an text editor?
Upvotes: 1
Views: 803
Reputation: 5563
try
$("#jwysiwyg").keyup(function(){
return dwr.util.getValue("jwysiwyg").length; // or try ur code here this.countChars(if length doesnt work)
});
Upvotes: 1