Maybe you want to take a look at [editor.js](
https://editorjs.io/) which is a block based editor with this we could have a custom block based editor.
I played around with it for a bit and it seems pretty nice.
We could add custom Blocks or special parsers for certain tools so that the output gets parsed into our normal format.