Markdown Editor v2 for Visual StudioDownload this extension from the Visual Studio Marketplace or get the CI build. This extension delivers a full featured Markdown editor with live preview, syntax-aware editing, and turnkey workflows for GitHub flavored Markdown.
Getting Started
Feature HighlightsEditing essentials
Live preview
Navigation and structure
Media workflows
Productivity tools
The sections below dive deeper into each area and include screenshots for quick orientation. Live Preview WindowThe preview window opens up on the right side of the document when it opens. Use
Every time the markdown document is modified, the preview window will update. The preview window is automatically scrolled to match the scroll position of the document. As the document is scrolled up and down, the preview window will follow. Live preview can be managed in the settings. Auto-hide tool window supportThe preview window uses WebView2 which, due to its HWND-based rendering, can overlap Visual Studio's auto-hide tool windows (like Solution Explorer when pinned to auto-hide). To mitigate this, enable Auto-hide for tool windows in the settings. When enabled, the preview temporarily hides when you expand an auto-hide tool window, and automatically reappears when the tool window collapses back. This ensures you can always interact with your tool windows without the preview getting in the way. Syntax highlightingAll fonts can be changed in Tools -> Options -> Environment -> Fonts and Colors dialog.
GitHub and other flavorsAdvanced markdown extensions are supported to give more features to the syntax. This includes pipe tables, emoji, mathematics and a lot more. Azure DevOps wiki syntaxThe editor supports Azure DevOps wiki-specific syntax for generating a table of contents. Table of Contents ( Add
This syntax is case-sensitive and must appear on its own line, matching Azure DevOps wiki behavior. Mermaid diagram supportThe editor supports all Mermaid diagram types for visualizing complex information. Mermaid diagrams are rendered in the live preview window using the native Mermaid.js library. Supported diagram types include:
Example - Flowchart:
Example - Sequence Diagram:
Mermaid diagrams automatically adapt to the current Visual Studio theme (light or dark mode). Standalone Mermaid filesIn addition to Mermaid code blocks in Markdown, the extension also supports standalone Mermaid files with
This is useful when you want to maintain complex diagrams as separate files or share them across multiple documents. Root path configuration for Jekyll/GitHub PagesWhen working with static site generators like Jekyll or GitHub Pages, you may want to use root-relative paths (paths starting with Option 1: YAML front matter (per-file)Add
Option 2: .editorconfig (project-wide)Add
This is useful when you want to set the root path once for an entire project rather than adding front matter to each file.
Priority: YAML front matter takes precedence over In these examples:
Key features:
Typical Jekyll structure:
This feature is particularly useful when editing Jekyll blog posts where the actual URL structure differs from the file system layout. Table formattingUse Visual Studio's standard format commands to align and beautify pipe tables: Ctrl+K, Ctrl+D formats all tables in the document. Ctrl+K, Ctrl+F formats tables within the current selection. The formatter aligns columns, pads cells to consistent widths, and respects column alignment markers ( Before:
After:
Table sortingClick any table header to sort the table by that column. Click again to toggle between ascending and descending order. Table headers are underlined to indicate they are clickable. Before (unsorted):
After clicking "Name" header (sorted ascending):
The sorter handles numeric values intelligently, so columns with numbers sort numerically rather than alphabetically. Column alignment is preserved after sorting. Enable or disable this feature in Tools -> Options -> Text Editor -> Markdown -> Advanced -> Enable table sorting. IntelliSenseEmoji IntelliSenseYou get full IntelliSense for over 1,600 emoji and smiley characters.
File path IntelliSenseWhen typing links
Anchor IntelliSenseType
Headings are shown with their level indicator (H1, H2, etc.) and automatically generate GitHub-compatible anchor slugs. Duplicate headings are handled with Cross-document anchors: You can also get anchor completions for other markdown files by typing the file path followed by
IntelliSense will parse the target markdown file and show all available headings. Heading-based navigationThe NavigationBar shows all of the document headings, like a table of contents. Select a heading to jump to that section of the document.
Document OutlineThe Document Outline tool window (View -> Document Outline) provides a persistent, hierarchical view of all markdown headings in your document. This is especially useful for navigating large documents. Features:
The Document Outline complements the NavigationBar dropdown by providing an always-visible overview of your document structure.
Drag 'n drop imagesDrag an image directly from Solution Explorer onto the document to insert the appropriate markdown that will render the image. Paste imagesThis is really helpful for copying images from a browser or for inserting screen shots. Simply copy an image into the clipboard and paste it directly into the document. This will prompt you for a file name relative to the document and then it inserts the appropriate markdown. It will even parse the file name and make a friendly name to use for the alt text. Image Optimizer integrationThis extension integrates with the Image Optimizer extension to optimize images. Automatic optimization on paste: When you paste an image into a markdown document, it can be automatically optimized using lossless compression. This feature is enabled by default and can be toggled in Tools -> Options -> Text Editor -> Markdown -> Advanced -> Optimize images on paste. Suggested actions: When your cursor is on an image reference in markdown (e.g.,
OutliningAny fenced code and HTML blocks can be collapsed, so that this:
...can be collapsed into this:
Keyboard shortcutsCtrl+Alt+R Refresh the preview window. Ctrl+Alt+K Inserts a new link. Ctrl+B makes the selected text bold by wrapping it with Ctrl+I makes the selected text italic by wrapping it with Ctrl+Space checks and unchecks task list items.
Tab increases indentation of list items. Shift+Tab decreases indentation of list items. Ctrl+K,C wraps the selection with HTML comments. Ctrl+K,U removes HTML comments surrounding the selection/caret. Floating toolbarWhen you select text in the markdown editor, a floating toolbar appears near the selection with quick access to common formatting commands:
Available actions:
The toolbar automatically positions itself above the selected text, or below if there isn't enough room above. It stays within the visible editor area and follows horizontal scrolling. Enable or disable this feature in Tools -> Options -> Text Editor -> Markdown -> Advanced -> Enable floating toolbar. AutomationVS command URL scheme supportThe markdown editor now supports executing Visual Studio commands directly from links in the preview window using the Example usage:
When you click these links in the preview window, the corresponding Visual Studio commands will be executed. A status message will show the result of the command execution. Custom styles and templateYou can provide your own .CSS and HTML templates used to render the preview window. The extension will look for the files md-styles.css and md-template.html in the same folder and any parent folder. If one or both of these files are found, they are being applied in the preview. The HTML template must contain the string [content] which is where the rendered markdown will be injected. You have to refresh the preview window after making changes to the custom CSS and HTML file. You can do that from the markdown editor context menu or by hitting Ctrl+Alt+R. Context menuRight-click anywhere in the markdown document to access the Markdown submenu with common tasks, such as toggling the preview window scroll sync, see Markdown references, and getting to the settings dialog.
SettingsControl the settings for this extension under Tools -> Options -> Text Editor -> Markdown
Community Feature RequestsThis extension addresses several popular feature requests from the Visual Studio Developer Community:
How can I help?If you enjoy using the extension, please give it a ★★★★★ rating on the Visual Studio Marketplace. Should you encounter bugs or if you have feature requests, head on over to the GitHub repo to open an issue if one doesn't already exist. Pull requests are also very welcome, since I can't always get around to fixing all bugs myself. This is a personal passion project, so my time is limited. Another way to help out is to sponsor me on GitHub. |










