Rich Text to HTML

Joined
May 13, 2005
Messages
18
Reaction score
0
Points
1
Hey Guys

I'm pretty new to coding but I'm working on a leopard app that can post entries to googles blogger service and at the moment it's just taking the contents of my NSTextView and setting them as NSString to be sent by the GData API. A developer over on the google discussions for the API said I can use a method which will take the contents of the text view as an NSAttributedString and then convert them to HTML.

The reason I want to do this is so the rich text I enter into the text view (Bold, italic & underline) will have the correct html tags attached to them when the post is sent to blogger. It's similar to saving a HTML file from TextEdit, except I dont want the excess stuff that gets generated, just the tags for adjusting the font type, like <b> for bold, <i> for italic and <u> for underline.

I know there are ways of doing it (becuase of TextEdit) but I need someone to give me a pretty good guide of implementing it as I have no experience with dictionaries. If someone here is willing to help out it would be awesome and I will credit you in my App (with your permission of coarse) or if you know of any good sources (apart from Apple's documentation) it would be very much appreciated.

I'm 17 and have only been developing for a couple of months so it's all pretty new to me.

Cheers
Alex Mills
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top