Have you already thought about something like a block based editor? Every block can be a certain kind. This could also facilitate remixing, you just pull other blocks in and out. For the preview I would expect it to always be the full document as it is later rendered on the client