Skip to main content

Markdown Editor

The built-in markdown editor provides a WYSIWYG editing experience for .md and .mdx files. It is based on the Milkdown framework and supports a wide range of markdown features including frontmatter, tables, math expressions, and embedded media.

Markdown editor - demonstration

Features

  • WYSIWYG markdown editing with live preview
  • Frontmatter support for YAML metadata
  • Embedding images, including as data URLs
  • Emoji support 🍒
  • Tables with keyboard navigation
  • Text formatting (bold, italic, strikethrough, inline code)
  • Headings (H1–H6)
  • Ordered, bullet, and task lists
  • Code blocks with syntax highlighting
  • Math expressions (LaTeX)
  • Blockquotes
  • Horizontal rules
  • Reading aloud the text content of the document (text-to-speech)
  • Visualizing the heading structure as a mind map
  • Copy and paste markdown content from other sources
tip

Type / on a new line to open a menu showing all available markdown elements — headings, lists, images, tables, quotes, code blocks, and more.

Frontmatter

The editor supports YAML frontmatter blocks at the beginning of markdown files. Frontmatter is a common way to store metadata such as titles, descriptions, tags, dates, or custom fields that can be used by static site generators and other tools.

A frontmatter block is delimited by triple dashes (---) and must appear at the very beginning of the file:

---
title: My Document
description: A brief summary of the content
date: 2026-03-15
tags:
- tutorial
- markdown
author: John Doe
---

# My Document

The actual markdown content starts here.

When editing a file with frontmatter, the editor displays the YAML block in a dedicated editable area at the top of the document, keeping it visually separated from the main content. You can edit the frontmatter fields directly in this area.

Frontmatter support in the md-editor
Frontmatter support in the md-editor

Mind Map View

The editor can generate a mind map visualization of the document based on its heading structure. This provides a quick overview of how the document is organized.

Screenshot of the markdown editor mind map

Live Demo

You can test the editor live here.

Keyboard Shortcuts

Mod is Cmd on macOS and Ctrl on Windows/Linux.

Essentials

ActionKey
CopyMod-c
CutMod-x
PasteMod-v
New LineEnter
Exit CodeMod-Enter
PrintMod-p
SaveMod-s

History

ActionKey
UndoMod-z
RedoMod-Shift-z

Formatting

ActionKey
BoldMod-b
ItalicMod-i
Inline CodeMod-e
Strike ThroughMod-Alt-x

Headings and Blocks

ActionKey
Normal TextMod-Alt-0
H1Mod-Alt-1
H2Mod-Alt-2
H3Mod-Alt-3
H4Mod-Alt-4
H5Mod-Alt-5
H6Mod-Alt-6
Code FenceMod-Alt-c
Line BreakShift-Enter

Lists

ActionKey
Ordered ListMod-Alt-7
Bullet ListMod-Alt-8
Task ListMod-Alt-9
Indent ItemMod-]
Outdent ItemMod-[

Tables

ActionKey
Next CellMod-]
Previous CellMod-[
Exit Table and BreakMod-Enter

Used Libraries

This extension relies on the following libraries:

Installation

This extension is packaged with every version of TagSpaces.

Source Code

The source code of this extension is freely available on GitHub.

Development

If you want to extend this extension, please follow the extension development guide.

License

MIT