Summary
Render Mermaid diagrams in the rich text editor (work item descriptions, comments, pages): a code block with language mermaid shows a live-rendered diagram preview alongside the still-editable code — the same UX as GitHub/Notion.
Why should this be worked on?
Engineering teams keep architecture diagrams, flows and sequence charts next to the work item they describe. Today a ```mermaid block in Plane renders as plain code, so teams paste screenshots instead — un-editable, un-versioned, and quickly stale. Native rendering keeps diagrams as text: diffable, copy-pasteable, and editable in place.
Implementation notes (working PR attached):
- Zero schema change: builds on the existing code-block node (
language-mermaid class), so Markdown round-trip, HTML export and yjs collaborative editing all keep working untouched; server-side HTML sanitization already allows language-* classes.
mermaid (~350KB gzip) is loaded via dynamic import() only when a mermaid block is on screen — zero cost otherwise; SSR-safe.
- Diagram follows the editor's light/dark theme; render errors show the source plus the parser message instead of breaking the editor; rapid typing is debounced.
- Read-only surfaces (peek overview, space public pages) render the diagram automatically via the same node view.
Summary
Render Mermaid diagrams in the rich text editor (work item descriptions, comments, pages): a code block with language
mermaidshows a live-rendered diagram preview alongside the still-editable code — the same UX as GitHub/Notion.Why should this be worked on?
Engineering teams keep architecture diagrams, flows and sequence charts next to the work item they describe. Today a
```mermaidblock in Plane renders as plain code, so teams paste screenshots instead — un-editable, un-versioned, and quickly stale. Native rendering keeps diagrams as text: diffable, copy-pasteable, and editable in place.Implementation notes (working PR attached):
language-mermaidclass), so Markdown round-trip, HTML export and yjs collaborative editing all keep working untouched; server-side HTML sanitization already allowslanguage-*classes.mermaid(~350KB gzip) is loaded via dynamicimport()only when a mermaid block is on screen — zero cost otherwise; SSR-safe.