Observe only content changes

I’m trying to watch for an event fired only when the actual textual content of CodeMirror changes.

I checked isClean method and change event but the both change/fire when other things happen to the editor, such as selection.

How can I check using those or other methods that the edited text actually has or hasn’t changed?

Both "change" and "changes" only fire when the actual document changes.

1 Like

Thank you, yes, you’re right. What I thought was CodeMirror’s doing was naturally my code which replaced the code immediately after reading it, hence I got an unexpected change event