Detecting GWT RichTextArea 'dirty' state

Posted by David on Stack Overflow See other posts from Stack Overflow or by David
Published on 2010-05-17T02:37:06Z Indexed on 2010/05/17 2:40 UTC
Read the original article Hit count: 247

Filed under:
|
|

I want to detect when the contents of my GWT RichTextArea become 'dirty' (have been changed by the user) in order to enable a 'save' button accordingly.

I suppose I could listen for key presses that are likely to have changed the contents; but browser support for key presses is notoriously quirky.

I suppose I could, before editing begins, save the original contents in a variable, and upon key press, compare the current contents against that variable, but doing that on each key press is going to be really slow.

Is there some neat way to achieve RichTextArea dirty-detection?

© Stack Overflow or respective owner

Related posts about gwt

Related posts about richtextbox