Closed woozI43 closed 4 years ago
This is actually what DidHtmlChangeListener is intended for: It tells you if html did change since last call to setHtml() or compared to an empty text if setHtml() hasn't been called.
So that you can set a save button's enabled state depending on the parameter of the callback.
(To verify this simply enter some text and then delete it again.)
If you want to track changes when the user is typing, use addHtmlChangedListener().
But be aware that the performance may be quite bad as the method's comment tells you.
thanks that works fine.
I add a simple save button on the text editor. I have a method inside the callback didHtmlChange that enables the save button when the user makes changes on the text and another method that disables the save button when the user saves the text. My problem is the callback only called once. How can I catch the event whenever the user constantly changes something on the text?