It may be possible to remove the text diffing logic from this library completely, and instead leverage the "changes" event from CodeMirror, which should contain information about changes that can be mapped onto JSON OT operations.
Related discussion in codemirror/dev#41