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
Add copy button to code blocks in Markdown preview #322269
Problem
There's currently no easy way to copy a code block from the rendered Markdown preview — you have to manually select the text, which is fiddly and easy to get wrong (e.g. accidentally including line numbers or surrounding text).
Proposal
Add a hover-triggered copy icon/button on each fenced code block (```) in the Markdown preview, similar to how GitHub, GitLab, and most documentation sites handle it. Clicking it copies the raw code content to the clipboard.
Scope
This applies specifically to the built-in Markdown preview (markdown-language-features extension) — not the Markdown source editor itself.
Additional context
Happy to put together a prototype/PR for this if the team is open to it.
Activity
KrushnaAsDeveloper commentedon Jun 22, 2026
PR #322274 by Harihar Jeevan (@hariharjeevan) is addressing this — tracking it here.
hediet commentedon Jul 7, 2026
This is a recording of the feature: