A Swift library that converts Markdown to NSAttributedString with extensive customization for iOS, macOS, tvOS, and watchOS.
SwiftyMarkdown is a Swift library that converts Markdown text into NSAttributedString objects for display in Apple's UI frameworks. It solves the problem of rendering richly formatted Markdown in native iOS, macOS, tvOS, and watchOS apps with full control over styling and typography.
iOS and macOS developers building apps that need to display formatted text from Markdown sources, such as documentation viewers, note-taking apps, or content-rich interfaces.
Developers choose SwiftyMarkdown for its deep customization capabilities, native Swift API, support for Apple's ecosystem features like Dynamic Type and Dark Mode, and its extensible rule-based engine that goes beyond basic Markdown parsing.
Converts Markdown files and strings into NSAttributedStrings with lots of customisation options.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Swift-native syntax with dot notation for styling, making it intuitive for Swift developers, as shown in examples like `md.h1.color = UIColor.red` and `md.body.fontName`.
Allows per-element styling for headers, body, bold, italic, etc., with support for alignment and font styles, enabling precise design matching without external CSS.
Automatically respects Dynamic Type for accessible text sizing and uses .label color for seamless Dark Mode support on iOS 13+, as highlighted in the README's defaults.
Built on a flexible tokenization system that supports custom line and character processing, allowing developers to define their own markup rules beyond standard Markdown, as detailed in the appendix.
Tied to Apple's NSAttributedString and NSTextAttachment, making it unsuitable for cross-platform use and causing image attachment failures on watchOS, as the README admits.
Advanced customization requires understanding boundary counts and token types, which can be overwhelming for simple use cases, with a steep learning curve detailed in the rule engine section.
Lacks support for common Markdown elements like tables and footnotes, limiting utility for complex document rendering compared to full-featured parsers, without mention in the supported features list.