A cross-platform framework for parsing and rendering Markdown as NSAttributedString on iOS and macOS.
CocoaMarkdown is a native framework for parsing and rendering Markdown in iOS and macOS applications. It converts Markdown directly to NSAttributedString, providing efficient text rendering without requiring HTML conversion. Built on top of the CommonMark reference implementation, it offers both high-level rendering APIs and low-level access to the Markdown AST.
iOS and macOS developers who need to display formatted Markdown content in their native applications, particularly those who want fine-grained control over text styling and rendering performance.
Developers choose CocoaMarkdown because it provides native NSAttributedString output with extensive styling customization, eliminating the HTML middleman that other libraries require. Its dual API design offers both convenience methods for simple rendering and low-level access for custom implementations.
Markdown parsing and rendering for iOS and OS X
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides low-level APIs like CMNode and CMIterator for traversing and customizing the Markdown Abstract Syntax Tree, enabling advanced parsing and custom renderer implementations beyond basic rendering.
Directly converts Markdown to NSAttributedString, skipping HTML conversion for efficient, performance-optimized rendering in iOS/macOS text views, as emphasized in the 'Why?' section of the README.
CMTextAttributes allows granular control over fonts, colors, and paragraph styles for all Markdown elements, with built-in support for Dynamic Type on iOS and incremental attribute setting for precise adjustments.
Includes transformers for common HTML tags (e.g., strikethrough, superscript) that can be registered with the renderer, extending Markdown functionality without relying on external HTML parsing.
Only supports iOS and macOS, making it unsuitable for cross-platform development or projects targeting other operating systems, which limits its applicability in modern multi-platform ecosystems.
Requires adding as a Git submodule and manually pulling dependencies, which is more complex and error-prone compared to automated package managers like Swift Package Manager, potentially slowing down onboarding.
Built strictly on the CommonMark standard, so it lacks built-in support for popular extensions like tables or footnotes, requiring custom implementation via the low-level API for non-standard features.