A modern Markdown editor for macOS, iOS, and iPadOS built with SwiftUI and SwiftData.
- π Live Markdown Preview - Real-time rendering with GitHub Flavored Markdown support
- π¨ Three-Column Layout - Sidebar, document list, and editor with adjustable preview
- π± Universal App - Native experience on Mac, iPad, and iPhone
- π Dark Mode - Beautiful styling that adapts to system appearance
- βοΈ iCloud Sync - Available with Mac MD Premium subscription
- π Projects - Group related documents together with icons and colors
- π·οΈ Tags - Flexible many-to-many tagging system with colored badges
- β Favorites - Quick access to important documents
- π Recents - Smart collection of recently accessed documents
- π¦ Archived - Hide completed documents without deleting
- β CommonMark - Full standard Markdown support via swift-markdown
- β GitHub Flavored Markdown - Tables, task lists, strikethrough, and more
- π PDF Export - Native PDF generation (Mac β , iOS β )
- π HTML Export - Standalone HTML files with embedded CSS (Mac β , iOS β)
- π Markdown Export - Export as .md files (Mac β , iOS β)
- π Document Stats - Word count, character count, last modified
Note: iOS HTML and Markdown exports are blocked by a confirmed SwiftUI framework bug where
.fileExporter()silently fails for certainFileDocumenttypes.
- π 38 Languages - Full localization across all platforms
- macOS 15.0+ (Sequoia)
- iOS 18.0+
- iPadOS 18.0+
- Xcode 16.0+
- Swift 6.0+
- Clone the repository:
git clone git@github.com:brainvat/markdown-editor.git
cd markdown-editor- Open in Xcode:
open "Markdown Editor.xcodeproj"-
Select your target platform (Mac, iPhone, or iPad)
-
Build and run (βR)
Mac MD follows modern Swift and SwiftUI best practices:
- SwiftData for local persistence with
@Modelmacro - CloudKit integration for iCloud syncing (Mac MD Premium only)
- Three core entities:
Document,Tag, andProject - Bidirectional relationships with proper cascade rules
- SwiftUI exclusively - no UIKit/AppKit representables (except WebView)
- NavigationSplitView for adaptive three-column layout
- @Observable macro for reactive state management
- Platform-specific adaptations where needed
- MarkdownManager - Centralized Markdown parsing and rendering (@MainActor)
- SubscriptionManager - StoreKit 2 subscription management
- Async/await throughout (Swift 6 strict concurrency)
Markdown Editor/
βββ Models/ # SwiftData eΓntities
β βββ Document.swift
β βββ Tag.swift
β βββ Project.swift
βββ Views/
β βββ Main/ # Three-column layout
β βββ Preview/ # WebKit-based renderer
β βββ Onboarding/ # Welcome splash screen
β βββ Components/ # Reusable sheets and dialogs
βββ Services/ # Business logic
βββ Utilities/ # Extensions and helpers
βββ Localizable.xcstrings # 38-language localization
- The original MacDown is a beloved open-source Markdown editor for macOS
- Mac MD was inspired by MacDown's elegant approach to Markdown editing
- Mac MD brings a similar experience to iOS/iPadOS with modern SwiftUI
- If you're on macOS only, definitely check out the original MacDown!
Xcode 26.3 Intelligence Tutorial by Stewart Lynch
- Incredible tutorial on using Xcode Intelligence (Claude integration) for SwiftUI development
- Stewart's YouTube Channel is an amazing resource
SwiftUI Agent Skill by Antoine van der Lee
- Claude by Anthropic - AI pair programming assistant
- SwiftUI & SwiftData by Apple - Modern app development framework
- Xcode - The amazing IDE that makes iOS development possible
- CLAUDE.md - Project memory, architecture decisions, and conventions
- Journal.md - Engineering journey with lessons learned and best practices
- SwiftData schema (Document, Tag, Project)
- Three-column NavigationSplitView layout
- Live Markdown preview (CommonMark + GFM via swift-markdown)
- Document CRUD with archive, favorites, sorting
- Project and Tag CRUD with color pickers
- Multi-select with bulk delete, move, and tag operations
- PDF export (Mac + iOS), HTML/Markdown export (Mac only)
- Settings: editor font, preview font, 10 color themes
- Welcome splash screen on first launch
- Mac MD Premium subscription (iCloud Sync via StoreKit 2)
- iCloud sync via CloudKit (Premium only)
- 38-language localization
- Marketing website (GitHub Pages)
- Beta system with variables and tab stops
- Editor intelligence (auto-pairing, smart list continuation)
- LaTeX/Math rendering (MathJax or KaTeX)
- macOS system extension for capturing text from any app
- Full-text search across all documents
- Custom export templates (CSS for HTML/PDF)
- Document templates
- Git integration
- Collaborative editing via iCloud shared documents
- Diagram support (Mermaid, PlantUML)
This project is licensed under the MIT License - see the LICENSE file for details.
Special thanks to:
- Stewart Lynch for the Xcode Intelligence tutorial that sparked this project
- Tzu-ping Chung for creating the original MacDown
- Paul Hudson for endless Swift education and the SwiftAgents project
- Antoine van der Lee for detailed SwiftUI patterns and agent skills
- The Swift Community for being amazing and supportive
- Anthropic for Claude, which assisted in building this entire project
Allen Hammock - @brainvat
Project Link: https://github.com/brainvat/markdown-editor
