Read Aloud in Edge
A small VS Code extension that opens a Markdown or text file, or a GitHub Copilot Chat answer, in
Microsoft Edge so Edge's Read Aloud can read it to you.
Plain JavaScript with no dependencies and no build step.
Read a file
Right-click a .md, .markdown or .txt file in the Explorer, in the editor, or in the Markdown
preview, and choose Read Aloud in Edge. The file opens in Edge as a rendered page; start Edge's
Read Aloud with Ctrl+Shift+U.
- Markdown is rendered with VS Code's own Markdown renderer, so it looks like the preview.
- Mermaid diagrams are drawn (Mermaid is bundled in media).
- When opened from the editor, the page jumps to and highlights the paragraph at your cursor, so
Read Aloud can start there.
- Relative images and links still work.
Read a chat answer
Click a Copilot Chat answer and press Ctrl+Alt+R, or click the speaker icon in the chat input.
The answer opens in Edge the same way. If no answer can be copied, the current clipboard text is
used instead.
Notes
- Windows only: it looks for
msedge.exe under Program Files.
- Requires VS Code 1.80 or later.
- The generated pages are written to
%TEMP%\read-aloud-edge.
- Pages are opened with a strict Content Security Policy: only the bundled Mermaid script can run,
never scripts from the file you open.
Limitations
Reading a chat answer uses an internal VS Code chat command
(workbench.action.chat.copyFinalResponse). It is not part of the public API and may change in a
future VS Code release.
Build from source
Requires Node.js for packaging.
npx @vscode/vsce package
code --install-extension read-aloud-edge-0.0.8.vsix
Use the .vsix file name that vsce prints, then reload VS Code.
Third-party code
media/mermaid.min.js is Mermaid,
MIT licensed; see mermaid.LICENSE.
Trademarks
Not affiliated with or endorsed by Microsoft. Microsoft Edge is a trademark of the Microsoft group
of companies.
License
MIT