How do I know when the contents changed

there is a property on Transform class (docChanged) that indicates if the document is changed after the transform. is it possible to determine if the contents change on a transaction? I am trying to keep my document persisted and need to be able to distinguish cursor movements from content edits.

I saw that the docChanged property uses the step count as an indicator of a content change. in dispatchTranaction(), is this true?

let contentChanged = (tr.steps.length > 0)

Transaction is a subclass of Transform, so docChanged exists on transaction objects as well.

ok, thanks!