NSAttributedString HTML Additions

Introduction

This project aims to duplicate the methods present on Mac OSX which allow creation of NSAttributedString from HTML code. This is useful for drawing simple rich text - like this document - without having to use a UIWebView.

Hi! I'm Oliver and I appreciate your help!

Features

At present the following tags are supported:

Currently attributes are inherited from enclosed tags via brute force. I don't know if this is accurate.

Known Differences

In many aspects DTCoreText is superior to the Mac version of generating NSAttributedStrings from HTML. These become apparent in the MacUnitTest where the output from both is directly compared. I am summarizing them here for references.

In the following "Mac" means the initWithHTML: methods there, "DTCoreText" means DTCoreText's initWithHTML and/or DTHTMLAttributedStringBuilder

Please Help!

If you find brief test cases where the created NSAttributedString differs from the version on OSX please send them to us!

Also there are many small things that you could help this project with. You can either implement these yourself or sponsor their development.

Follow @cocoanetics on Twitter

This code is covered by a BSD License. © 2011 Oliver Drobnik