Are you referring to the Visual or the HTML editor or both?
According to jQuery Set Cursor Position in Text Area it is possible to set the cursor position for a textarea element. That is good news, as AFAIK the WordPress HTML editor is using a textarea element.
The WordPress Visual editor in difference is based on TinyMCE. TinyMCE does not support a cursor position natively (I assume this only, and it’s only backed this up by a first, quick googling ). So this is not possible out of the box.
But there are some resources that offer a method of how to do that with TinyMCE.
I think you could add a javascript that does the following:
- On loading of the post editor, check if a cookie exists for the postId.
- If so, set the cursor position. If not, do nothing.
- Then set a flag that cursor capturing is enabled.
- While cursor capturing is enabled, On each keypress set a cookie for the postId and the cursor position.
Done.