Werk 42

Package

Version
0.16.0, 15 Nov 2026
Platform
macOS 14 or later
Toolchain
Swift 5.9, Xcode 15 or later
License
Apache 2.0
Built on
AppKit and TextKit 2, with a SwiftUI wrapper

Install

.package(url: "https://github.com/nodes-app/swift-markdown-engine", from: "0.16.0")

Use

import SwiftUI
import MarkdownEngine

struct EditorScreen: View {
    @State private var text = "# Hello, *world*"

    var body: some View {
        NativeTextViewWrapper(text: $text)
    }
}

Demo

Live styling
LaTeX

Products

MarkdownEngine
The editor. No dependencies.
MarkdownEngineCodeBlocks
Code blocks with syntax highlighting, through HighlighterSwift.
MarkdownEngineLatex
LaTeX formulas, through SwiftMath.

Features

  • Live Markdown styling: headings, emphasis, lists, quotes, GFM tables, task lists, rules
  • Wiki links, stored as [[Name|id]] and shown as [[Name]]
  • Image embeds, ![[Name]] and ![alt](url)
  • Inline $...$ and block $$...$$ LaTeX
  • Fenced code blocks with a copy button
  • A fixed reading column; wide tables break out to the window
  • A SwiftUI header that scrolls away with the document
  • Writing Tools on macOS 15.1 and later
  • Spelling and grammar, quiet inside code, LaTeX and wiki links
  • Extensions by delimiter pair (==highlight==) and directives by name (@font(size: 18){text})