Edit

Share via


Markdown preview controls

The Visual Studio Markdown editor gives you more control over how you view and edit Markdown files. You can switch between different preview modes to focus on either editing or viewing rendered content, and you can zoom in on Mermaid diagrams to see details in complex visualizations.

Preview modes

Visual Studio provides three preview modes for working with Markdown files:

Mode Description
Split Preview Shows the editor and preview side by side. This mode is the default and lets you see your changes rendered in real time as you type.
Open Preview Shows only the rendered preview content. Use this mode when you want to focus on the final output, especially for reviewing large images or complex Mermaid diagrams.
Edit Markdown Shows only the editor without the preview pane. Use this mode when you want to focus on writing and editing without distractions.

To switch between preview modes, use the preview controls in the editor toolbar when you have a Markdown file open.

Screenshot of the Markdown preview controls in the Visual Studio editor toolbar, showing options for Split Preview, Open Preview, and Edit Markdown modes.

Zoom Mermaid diagrams

When you preview a Markdown file that contains a Mermaid diagram, you can use the zoom controls to get a better view of the diagram. This feature is especially useful for large or complex diagrams where you need to see details.

To zoom in or out on a Mermaid diagram:

  1. Open a Markdown file that contains a Mermaid diagram.
  2. Switch to Split Preview or Open Preview mode.
  3. Use the zoom controls in the top left corner of the preview pane to zoom in or out.

Tip

The preview-only mode (Open Preview) combined with zoom controls is particularly helpful when working with architectural diagrams, flowcharts, or sequence diagrams that have many elements.

Screenshot of a Mermaid diagram in the Visual Studio Markdown preview with zoom controls visible in the top left corner.