I'm working on a Greasemonkey script for gmail and I need to find a way to refer to gmail's textboxes (when you compose and reply to an email). Gmail has an iframe with a new HTML and the text is in the body, as part of it's WYSIWYG editor. I've tried selecting all the classes of those elements with jquery, but they don't work -- specially, .keypress()
Here's what I have tried:
$(".editable LW-avf").keypress(function(event) {
... // the wysiwyg body
});
$(".Am Al editable").keypress(function(event) {
... // the iframe
});
Is there any way to bind a keypress event handler? Or is it even possible since gmail isn't a conventional textbox?