Position: HOmeView>Content
Cocoanetics
Publish 7 years ago View No comments

NSAttributedString HTML Additions

This project aims to duplicate the methods present on Mac OSX which allow creation of NSAttributedString from HTML code on iOS.

This is useful for drawing simple rich text like any HTML document without having to use a UIWebView.

Features

At present the following tags are supported:

  • Headers H1 – H6
  • Paragraphs: P
  • Bold: B, STRONG
  • Italic: I, EM
  • Underline: U
  • Superscript: SUP
  • Subscript: SUB, e.g. e = mc2
  • Styling: FONT (face and color, not size). It would be great if we could support many more styles
  • Unordered Lists: UL, LI
  • Ordered Lists: OL, LI

Currently attributes are inherited by enclosed tags via ‘brute force’. I don’t know if this is accurate.

GitHub Home:https://github.com/Cocoanetics/NSAttributedString-Additions-for-HTML

 

Previos
Next

Comment


/ Shortcut:Ctrl+Enter