@kevin I'm not sure if it matches what you're looking for, but prosemirror might have some interesting aspects? https://prosemirror.net/docs/guide/