added a separate listener that you pass the textarea into. then you just...

... get what you need from it