Reka solves this by providing an AST-powered state system that enables end-users to create UI components that are nearly as complex as ones that developers could write in code; along with an interpreter to efficiently compute an output that could be rendered on the browser.
Furthermore, Reka provides additional extensions, such as enabling real-time collaboration via CRDTs; or you could build a custom extension to support additional functionalities such as a commenting system.
All that's left is for you to build your own UI abstractions on top of Reka — designing your editor UI/UX and providing easy-to-use buttons/controls for your end-users to mutate the underlying state in Reka.