That may help with implementing this actually, as I think the difficulty with retaining the cursor position could be related to that there is no carat in view mode, except when you highlight text. Although it might also be a challenge in general syncing the scroll position of 2 separate WebViews for view / edit mode, as one uses the CodeMirror / ProseMirror editor and the other some other renderer