Skip to content

Markdown Preview plugin

A live, side-by-side preview of the active Markdown document, rendered in a dockable panel that updates as you type. The renderer is dependency-free (it uses Qt's built-in rich-text view, not a web engine), so this plugin is always available and adds no heavy dependencies.

Where to find it

View ▸ Markdown Preview opens (or closes) the preview dock for the current tab. The dock prefers the right-hand side and can be dragged, floated, or tabbed like any other panel.

How it behaves

  • Live render. The preview re-renders as you type, debounced so typing stays responsive (the debounce relaxes automatically for very large files).
  • Follow the caret. With Follow caret enabled (toolbar), the preview scrolls to the block you are editing whenever the caret moves to another line. Because only a caret move scrolls it, a Find jumps the preview to the match and then leaves it alone — you can scroll away from the match and it stays where you put it until you move the caret again. Toggle the option off to scroll the preview entirely independently. The setting is remembered.
  • Theme-aware. Preview colours come from the active editor theme (text, code blocks, block quotes, links), so the preview matches a light or dark theme and updates live when you change themes. You can fine-tune these colours in the Theme Editor under the Markdown categories.
  • Export / open in browser. The toolbar can export the rendered HTML to a file or open it in your default browser. Either way you get a clean, standalone page: plain, semantic markup with none of the scaffolding the panel needs for itself, and a fixed light stylesheet so the shared file reads normally regardless of your editor theme.
  • Panel size. The preview keeps a share of the window rather than a fixed width, so it grows and shrinks with the window — see saved layout.

Preview visibility

Preview visibility is remembered per file, both during a session and across restarts:

  • Markdown files (.md, .markdown, .mdown, .mkd, .mkdn, .mdwn, .markdn, .mdtxt) open the preview automatically the first time you view them. This "auto-open" default is a persistent toggle under View ▸ Auto-open Markdown Preview.
  • Other files don't — but you can open the preview on any file with View ▸ Markdown Preview, and it will render that file as Markdown.
  • Within a session, whatever you choose for a tab is restored when you switch back to it.
  • Across restarts, your explicit choice for a file is remembered: close the preview on a file and it stays closed the next time you open that file; open the preview on a file that wouldn't auto-open and it reopens. Files you never explicitly touched simply follow the auto-open default each time — so turning auto-open on later still opens previews you never deliberately closed.

What it renders

  • Inline formatting — *italic*, **bold**, ***bold italic***, ~~strikethrough~~, inline code, and hard line breaks.
  • Headings — both the # form and the underlined (setext) form.
  • Lists — ordered and unordered, nested, tight or loose (a loose list gets paragraph spacing), starting at whatever number you wrote, and task lists: - [ ] and - [x] render as ☐ and ☑.
  • Tables — pipe tables with per-column alignment (left, centre, right). A short row is padded out, a surplus cell is dropped, and a wide table wraps rather than being clipped.
  • Code — fenced blocks and indented blocks alike, drawn in a bordered, filled box in a fixed-pitch font, so a block stands out from the prose and ASCII diagrams and aligned columns keep their shape.
  • Links and images — inline, reference-style ([text][ref] with its definition anywhere in the file), and bare http://, https:// or www. addresses, which become links on their own. Image paths resolve relative to the file.
  • Block quotes and horizontal rules.
  • YAML front matter — the --- … --- metadata block some tools expect at the very top of a file is shown as a yaml code block, not mistaken for a heading.

Raw HTML is shown as text, deliberately: markup is escaped rather than executed, so previewing a document you did not write cannot run anything. HTML blocks and footnotes are not rendered.

Clicking a link in the preview opens it only when the destination is http, https or mailto; a #fragment scrolls the preview to that heading. Every other destination — a file: path, a plain or relative path, a javascript: address, some application's own scheme — is ignored, and the status bar says which link was not opened and why. The reason is the document itself: a Markdown file you cloned or downloaded is someone else's text, and one click in it must not be able to start a program on your machine.

Hovering a link shows where it leads before you commit to the click, with a second line when it is one the preview will not open.

See also

  • HTML Preview — full-fidelity preview (CSS/JavaScript) for HTML and PHP, using QtWebEngine.
  • Theme Editor — adjust the preview's Markdown colours.