You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: UI toggle between rendered and source view for mermaid and svg blocks #24641
I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
I reviewed the Discussions, and have a new and useful enhancement to share.
Feature Description
Mermaid and svg blocks render inline with copy and preview buttons, but there is no way to look at the source behind the render without copying it out.
Add a small toggle next to copy and preview that flips the block between its rendered view and its source code, then back. Useful when you want to read or tweak what the model actually produced, not just see the result.
Applies to both rendered block types, mermaid and svg, as one shared button.
Default stays on the rendered view.
The source view reuses the normal code block look (same styling and syntax highlighting).
Consider making code blocks containing SVG or Mermaid elements scrollable; this would ensure consistent behavior with the rest of the code block content.
The option: "Use full-height code blocks
Always display code blocks at their full natural height, overriding any height limits." already works perfectly.
Activity
ServeurpersoCom commentedon Jun 15, 2026
Memo for this PR following #24080 :
Consider making code blocks containing SVG or Mermaid elements scrollable; this would ensure consistent behavior with the rest of the code block content.
The option: "Use full-height code blocks
Always display code blocks at their full natural height, overriding any height limits." already works perfectly.