this is really neat, and i look forward to diving in more. i've built a couple different Mermaid-related apps/plugins, and i think the wysiwyg you implemented here is pretty clean. nice work!
and glad that this led me to OpenKnowledge.. hadn't seen that before