I’m loading in text from a plist and displaying it within my app. Ideally I want to be able to specify more complex formatting such as italics, bold and superscript text, and display it in a custom label such as TTTAttributedLabel.
Are there any available libraries to parse a string in a given format (preferably a simple text format such as Markdown or Textile) into an NSAttributedString? I am aware that solutions are available for parsing RTF and HTML, but this is overkill for my needs – plus I’d like the text to be easily written by hand.
Edit: this is for iOS/UIKit
I’ve just added an
NSStringtoNSAttributedStringlightweight markup parser to MGBoxKit. It’s not Markdown or Textile but it’s very similar. So far it supports bold, italics, underline, monospacing, and coloured text.The MGMushParser class could be used standalone, and is fairly easy to extend.
OHAttributedLabel also has a similar markup parser.