Skip to content

Commit 571ae6e

Browse files
committed
Pretty readme to show off features
1 parent 4d6189b commit 571ae6e

File tree

2 files changed

+47
-4
lines changed

2 files changed

+47
-4
lines changed

README

-4
This file was deleted.

Readme.markdown

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# NSAttributedString HTML Additions
2+
3+
This project aims to duplicate the methods present on Mac OSX which allow creation of `NSAttributedString` from HTML code on iOS.
4+
5+
This is useful for drawing simple rich text like any HTML document without having to use a `UIWebView`.
6+
7+
## Features
8+
9+
At present the following tags are supported:
10+
11+
* Headers H1 - H6
12+
* Paragraphs: P
13+
* Bold: B, STRONG
14+
* Italic: I, EM
15+
* Underline: U
16+
* Superscript: SUP
17+
* Subscript: SUB, e.g. e = mc<sup>2</sup>
18+
* Styling: FONT (face and color, not size). It would be great if we could support many more styles
19+
* Unordered Lists: UL, LI
20+
* Ordered Lists: OL, LI
21+
22+
Currently attributes are inherited by enclosed tags via 'brute force'. I don't know if this is accurate.
23+
24+
## To Do
25+
26+
### NSAttributedString+HTML
27+
28+
* Decode HTML Entities
29+
* A HREF tags, to format links
30+
* More styles, as far as supported by CoreText
31+
32+
### DTAttributedTextView
33+
34+
* Run Delegate: make room for IMG and draw the IMG
35+
* Run Delegate: Characters with super/subscript need baseline adjusted when drawn
36+
* Caret Positioning
37+
* Hit Detection on strings attributed with HREF
38+
* Text Insertion
39+
* Editing!
40+
41+
There is still quite a few more things to do on the project. DEL, possibly CSS styles as they related to fonts and text formatting.
42+
43+
## Please Help!
44+
45+
If you find brief test cases where the created `NSAttributedString` differs from the version on OSX please send them to us!
46+
47+
Follow [@cocoanetics](http://twitter.com/cocoanetics) on Twitter.

0 commit comments

Comments
 (0)