MarkEdit Documentation

Just like TextEdit on Mac but dedicated to Markdown.

5,385 stars Swift Swift 1 file ยท ~2,007 tokens #codemirror#codemirror6#editor#mac#macos#markdown#markdown-editor#swift
RAW Doc

File: README.md

MarkEdit

MarkEdit is a free and open-source Markdown editor, for macOS. It's just like TextEdit on Mac but dedicated to Markdown.

No bloat. Markdown editing done right in a 4 MB app that flies through million-line files.

We do not claim to be the best in any single dimension. Instead, we aim to strike the right balance across size, speed, native integration, and correctness.

For perspective: at just 4 MB, MarkEdit is much smaller than Electron apps. Handling a 10 MB file with ease puts it ahead of TextKit-based editors. Performance-first editors built with Rust lack native features, while correctness alone rules out editors that rely on regex-based Markdown parsing.

[!TIP]
Discover our other free and open-source apps at libremac.github.io.

Follow our Mastodon account @MarkEditApp for the latest updates.

Preview

What makes MarkEdit different

  • Privacy-focused: doesn't collect any user data
  • Native: clean and intuitive, feels right at home on Mac
  • Fast: edits 10 MB files easily
  • Lightweight: installer size is about 4 MB
  • Extensible: seamless integration with Shortcuts and AppleScript

MarkEdit strictly follows the GFM specification, with no proprietary syntax or invented features. Complex editing like multi-caret and code folding is built on CodeMirror 6 for correctness and performance, consistently faster than most macOS editors. UI controls remain native to macOS in both aesthetics and behavior, including force-touch word lookup, inline predictions, and Writing Tools.

Customization is built around CSS, JavaScript, and CodeMirror extensions. Official extensions include MarkEdit-preview for a preview pane, MarkEdit-theming for custom themes, and MarkEdit-ai-writer for Apple Intelligence on macOS Tahoe or later.

To learn more, refer to Philosophy, Why MarkEdit and MarkEdit Extensions.

Installation

Get MarkEdit.dmg from the latest release, open it, and drag MarkEdit.app to Applications. Or install via Homebrew: brew install --cask markedit.

MarkEdit checks for updates automatically; you can also browse version history here.

For older macOS: macos-12, macos-13, macos-14.

Using MarkEdit

Please refer to the wiki page for details. Check out MarkEdit-skill if you're interested in managing MarkEdit with an AI agent.

Why MarkEdit is free

MarkEdit is a tool we use every day and keep improving for ourselves. We ship it openly, hoping it's useful to others with the same needs.

Contributing to MarkEdit

For bugs, open an issue or pull request. For behavior changes, discuss first; MarkEdit is intentionally minimal (why).

Please refer to the wiki page for development instructions.

Acknowledgments

Built on CodeMirror 6, with ts-gyb for code generation.


File: CoreEditor/src/@vendor/lang-markdown/README.md

MarkEdit-app/lang-markdown

For now, lang-markdown is mostly copied from the @codemirror/lang-markdown package, with minimal changes to the insertNewlineContinueMarkup command and findSectionEnd function.

Check "[MarkEdit]" to see the actual modified behavior.

@codemirror/lang-markdown [](https://www.npmjs.org/package/@codemirror/lang-markdown)

[ WEBSITE | ISSUES | FORUM | CHANGELOG ]

This package implements Markdown language support for the
CodeMirror code editor.

The project page has more information, a
number of examples and the
documentation.

This code is released under an
MIT license.

We aim to be an inclusive, welcoming community. To make that explicit,
we have a code of
conduct
that applies
to communication around the project.

Usage

javascript
import {EditorView, basicSetup} from "codemirror"
import {markdown} from "@codemirror/lang-markdown"

const view = new EditorView({
  parent: document.body,
  doc: `*CodeMirror* Markdown \`mode\``,
  extensions: [basicSetup, markdown()]
})

API Reference

@markdown

@markdownLanguage

@commonmarkLanguage

@insertNewlineContinueMarkup

@insertNewlineContinueMarkupCommand

@deleteMarkupBackward

@markdownKeymap

@pasteURLAsLink


File: CoreEditor/src/@vendor/README.md

@vendor

Due to different reasons, this folder contains several packages that are copied from other projects instead of using them as npm packages, with necessary modifications made to fit our needs.

ESLint ignores this entire folder.


File: CoreEditor/src/@codegen/README.md

@codegen

This folder contains the code generation templates for the bridge between the web application and native code.

It uses ts-gyb to analyze TypeScript interfaces and generate Swift code.


File: MarkEditCore/README.md

MarkEditCore

This package provides core capabilities to bootstrap the CoreEditor, including configurations, encoding, and decoding.

It can be used in a full-fledged editor like MarkEditMac, or a read-only host like QuickLookMac.

Note that this package should be platform-independent.


File: MarkEditKit/README.md

MarkEditKit

This package provides most functionalities to use the CoreEditor, including a WKWebView wrapper, and bi-directional communication between web application and native code.

Most code in this package is automatically generated by inferring the TypeScript code, which is located in the CoreEditor folder. To understand how it works, take a look at ts-gyb.

Ideally, this package should be able to run on both macOS and iOS.


File: MarkEditMac/Modules/README.md

MarkEditMac.Modules

Isolated modules that serve the MarkEditMac business logic, including AppKit extensions, customized UI controls, etc.

Each folder in this package produces a standalone target, they can be built independently.

Everything in this package is written specifically for macOS, not verified on iOS.


File: MarkEditTools/README.md

MarkEditTools

This package provides dev tools for all targets, such as SwiftLint.

Note that this package should be platform-independent.