Skip to content

chrisdhaan/CDMarkdownKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CDMarkdownKit

CI Status Swift Versions Platforms CocoaPods Compatible Swift Package Manager Compatible License


A pure-Swift, zero-dependency framework for parsing Markdown text into styled NSAttributedString.

Features

  • Parse Markdown to styled NSAttributedString
  • Support for bold, italic, strikethrough, headers, lists, quotes, code blocks
  • Clickable links and automatic URL detection
  • Image rendering (iOS, macOS, tvOS)
  • Async image loading with async/await
  • Custom Markdown elements
  • UILabel and UITextView subclasses with Markdown support
  • Swift 6 concurrency safety

Quick Example

import CDMarkdownKit

let parser = CDMarkdownParser()
let markdown = "# Hello **World**\n\nThis is *italic* text."
let attributedString = parser.parse(markdown)
label.attributedText = attributedString

Requirements

Platform Minimum OS Swift Installation
iOS 12.0+ 5.3+ SPM, CocoaPods
macOS 10.13+ 5.3+ SPM, CocoaPods
tvOS 12.0+ 5.3+ SPM, CocoaPods
watchOS 4.0+ 5.3+ SPM, CocoaPods
visionOS 1.0+ 5.3+ SPM, CocoaPods

Installation

Swift Package Manager

Add to your Package.swift:

.package(url: "https://github.com/chrisdhaan/CDMarkdownKit.git", from: "3.0.0")

Or in Xcode: File → Add Packages and enter the repository URL.

CocoaPods

Add to your Podfile:

pod 'CDMarkdownKit', '~> 3.0'

Run pod install.

Usage

For comprehensive usage documentation including styling, custom elements, and platform-specific information, see Documentation/Usage.md.

Contributing

We welcome contributions! Before contributing to CDMarkdownKit, please read the detailed instructions in our contribution guide. We maintain high standards for code quality and test coverage, and we're happy to help you get your changes integrated.


License

CDMarkdownKit is available under the MIT license. See the LICENSE file for more info.

About

An extensive Swift framework providing simple and customizable markdown parsing.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors