Popularity
7.2
Stable
Activity
1.7
-
1,045
15
134

Code Quality Rank: L3
Monthly Downloads: 0
Programming language: Swift
License: MIT License
Tags: Text    
Latest version: v0.6.0

SwiftyMarkdown alternatives and similar libraries

Based on the "Text" category

Do you think we are missing an alternative of SwiftyMarkdown or a related project?

Add another 'Text' Library

README

SwiftyMarkdown

SwiftyMarkdown converts Markdown files and strings into NSAttributedString using sensible defaults and a Swift-style syntax. It uses dynamic type to set the font size correctly with whatever font you'd like to use

Installation

CocoaPods:

pod 'SwiftyMarkdown'

Usage

Text string

let md = SwiftyMarkdown(string: "# Heading\nMy *Markdown* string")
md.attributedString()

URL

if let url = Bundle.main.url(forResource: "file", withExtension: "md"), md = SwiftyMarkdown(url: url ) {
    md.attributedString()
}

Supported Features

*italics* or _italics_
**bold** or __bold__

# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6

`code`
[Links](http://voyagetravelapps.com/)

Customisation

md.body.fontName = "AvenirNextCondensed-Medium"

md.h1.color = UIColor.redColor()
md.h1.fontName = "AvenirNextCondensed-Bold"
md.h1.fontSize = 16
md.italic.color = UIColor.blueColor()

Screenshot

Screenshot