A powerful, native Markdown editor for macOS with integrated drawing capabilities. Built with SwiftUI, CodeMirror, and PencilKit.
MarkDown Mac combines the power of a WYSIWYG Markdown editor with professional drawing tools, offering a unique note-taking experience similar to apps like Minimal.app but with additional features.
- WYSIWYG Editing: Headers, bold, and italic text are styled in-place for a rich editing experience
- Syntax Highlighting: Code blocks with syntax highlighting support
- Live Preview: Real-time Markdown preview
- Image Support:
- Drag & drop images directly into the editor
- Paste images from clipboard
- Automatic Base64 to file conversion
- Mermaid Diagrams: Support for flowcharts, sequence diagrams, and more
- Export to PDF: Save your notes as PDF documents
Powered by PencilKit, the app includes professional drawing capabilities:
- Pen: Fine, precise strokes
- Pencil: Smooth strokes with texture
- Marker: Thick, translucent strokes
- Eraser: Precise vector erasing
- Lasso: Select, move, and transform drawings
- Ruler: Straight line assistance mode
Draw perfect geometric shapes:
- Rectangle
- Circle/Ellipse
- Triangle
- Arrow
- Line
- Star
All shapes support:
- Real-time preview while dragging
- Automatic conversion to PencilKit strokes
- Customizable color and stroke width
- Full undo/redo support
- Native macOS UI: Sidebar, Toolbar, and Search using native controls
- Undo/Redo: Full support with keyboard shortcuts (⌘Z / ⌘⇧Z)
- Color Picker: Visual color selection for drawing tools
- Stroke Width Control: Adjustable line thickness with visual feedback
- Note Management: Organize your notes in the Documents folder
- Tooltips: Contextual help for all tools
- macOS 10.15 (Catalina) or later
- Xcode 12.0 or later (for building from source)
- Clone the repository:
git clone https://github.com/mherrera53/MarkDown-Mac.git
cd MarkDown-Mac- Open the project in Xcode:
open "MarkDown Mac.xcodeproj"-
Select the
MarkDown Macscheme -
Build and run (⌘R)
- Create a new note or select an existing one from the sidebar
- Type your Markdown content in the editor
- Use the toolbar for formatting options
- Preview updates in real-time
- Click the Draw button to activate drawing mode
- Select a drawing tool from the toolbar
- Choose a color and stroke width
- Draw directly on the canvas
- Click the shapes button (⬜ icon) in the toolbar
- Select a shape from the dropdown menu
- Drag on the canvas to draw the shape
- Release to convert to a PencilKit stroke
- Select the Lasso tool
- Draw a circle around strokes to select them
- Drag to move the selection
- Pinch to scale (with trackpad)
- Select the Ruler tool
- Draw lines - they will automatically straighten
MarkDown Mac/
├── ContentView.swift # Main UI (Sidebar, Toolbar, Editor)
├── HybridMarkdownEditor.swift # Bridge between Swift and Web Editor
├── NativeMarkdownEditor.swift # Native Markdown editing components
├── PaperMarkupView.swift # PencilKit canvas wrapper
├── ShapeToolView.swift # Geometric shapes implementation
├── NoteManager.swift # File saving/loading logic
├── MarkdownPreviewView.swift # Markdown preview renderer
├── MermaidRenderer.swift # Mermaid diagram support
├── WebResources/
│ ├── index.html # WebView HTML template
│ ├── app.js # CodeMirror and Markdown-it logic
│ ├── style.css # Editor styles
│ └── lib/ # JavaScript libraries
│ ├── codemirror/ # CodeMirror editor
│ ├── markdown-it/ # Markdown parser
│ ├── highlight/ # Syntax highlighting
│ └── mermaid/ # Diagram rendering
- UI Framework: SwiftUI
- Editor: CodeMirror 5
- Markdown Parser: markdown-it with plugins (emoji, footnotes, sub/sup)
- Drawing Framework: PencilKit
- Syntax Highlighting: highlight.js
- Diagrams: Mermaid.js
- Web Bridge: WKWebView
When running from Xcode, you may see system logs. These are normal and can be safely ignored:
AFIsDeviceGreymatterEligible ...: macOS Sequoia's Apple Intelligence checksUnable to create bundle at URL ((null)): Harmless WebKit debug warningIconRendering ... invalid format: Internal macOS rendering log
As long as the app launches and you can type/draw, everything is working correctly.
If you encounter build errors:
- Clean the build folder (⌘⇧K)
- Ensure you're running Xcode 12.0 or later
- Verify macOS target is set to 10.15 or later
- Check that all WebResources files are included in the bundle
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
If you find MarkDown Mac useful, consider supporting its development:
Your support helps maintain and improve MarkDown Mac!
This project is available under the MIT License. See LICENSE file for details.
- Built with SwiftUI
- Editor powered by CodeMirror
- Markdown parsing by markdown-it
- Diagrams by Mermaid
- Drawing capabilities by PencilKit
Future enhancements under consideration:
- Text annotation tool for canvas
- Note templates library
- iCloud synchronization
- Additional export formats (HTML, DOCX, images)
- Custom themes
- Real-time collaboration
Made with ❤️ for the macOS community