Part of what has made developing the document so difficult is having multiple states for each unit. They can either be rendered statically (debugged in red here) or editable. Shifting focus around the document in a natural way means the editing state must be set by the component in response to the user hitting the return or delete key.
I think I'm getting there. I sorted out the shifting focus and rendered state, plus fixed a bunch of issues with creating new units when pressing "return". One bit of functionality that seems really simple but was an absolute pain to develop is when you hit "delete" at the beginning of a unit with content in it. In this case the content is appended to the unit above it and the cursor is placed at the point where the old content joins the new. Very happy with how that turned out; it feels very natural.