Skip to content

stutiredboy/Markdown2

Repository files navigation

Markdown2

Markdown Editor Too — a lightweight native macOS Markdown editor & reader

[中文] [English]

GitHub stars License Latest release

Inspired by Typora's minimal writing flow, Markdown2 keeps the distraction-free experience in a compact, native macOS app built with SwiftUI + AppKit.

Features

  • Single-window editing — one main surface with Write and Read modes instead of a side-by-side preview.
  • Native AppKit text editing with lightweight Markdown styling.
  • Live-rendered HTML reading mode.
  • Outline sidebar generated from headings.
  • Standard macOS open/save panels with debounced autosave for saved documents, plus close/quit confirmation for unsaved changes.
  • Multi-window support — each document opens in its own window; untouched starter windows are reused when opening files from Finder or the open panel.
  • Word, character, line, and reading-time status bar.
  • Rich Markdown rendering — headings, paragraphs, emphasis, links, images, blockquotes, horizontal rules, ordered/unordered/task lists, tables, fenced code with syntax highlighting, YAML front matter, and [TOC].
  • Math typesetting — inline $...$ and display $$...$$ TeX rendered offline with bundled KaTeX (no network required), including the mhchem extension for chemistry (\ce{...}).
  • Diagramsmermaid, flow (flowchart.js), and sequence (js-sequence-diagrams) code blocks rendered offline with bundled engines (no network required).
  • Footnotes[^id] inline references rendered as numbered superscript links; [^id]: text definitions collected into a trailing footnotes section with back-references. Supports named labels, multi-line definitions, duplicate references, and graceful fallback for undefined labels. Offline-rendered, legible in both light and dark modes.
  • Quick mode switching — press Esc in the editor to switch to preview; Cmd+double-click in preview to jump back to edit.
  • App settings for language, default open mode, and default outline visibility.
  • Markdown file type declaration for .md and .markdown files when packaged.

See Docs/MarkdownSupport.md for the tested Markdown/Typora support matrix.

Install

Download the latest Markdown2.app from Releases, then drag it to /Applications.

Note

Apps downloaded from GitHub Releases are not signed or notarized by Apple. macOS Gatekeeper will block them with a "damaged" warning. Run the following command to remove the quarantine attribute:

xattr -cr /Applications/Markdown2.app

Then open System Settings → Privacy & Security and click Open Anyway, or simply double-click the app.

Run from Source

swift run Markdown2

Open a file directly:

swift run Markdown2 path/to/file.md

Build a local macOS app bundle:

Scripts/package_app.sh
open dist/Markdown2.app

Run the full local verification suite:

Scripts/functional_test.sh

Test

swift test

License

Markdown2 is open source under the MIT License.

About

Markdown Editor Too!

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors