string to html.
string to html.
- Subject: string to html.
- From: email@hidden
- Date: Fri, 16 May 2008 06:42:59 -0400 (EDT)
- Importance: Normal
hi,
I've to convert text or image to its corresponding html code.
i've done
setContentType: @"text/html";
setContentTransferEncoding:None;
setCharset: @"us-ascii"
NSDictionary* attr = [NSDictionary
dictionaryWithObject:NSHTMLTextDocumentType
forKey:NSDocumentTypeDocumentAttribute];
NSAttributedString* textValue = [[NSAttributedString alloc]
initWithString: [self messageField]];//where messageField returns string.
NSData* tData = [textValue dataFromRange: NSMakeRange(0, [[self
messageField] length])
documentAttributes: attr error: nil];
tData still giving the text value not it scoresponding html code.So is it
right way?or Am i mis anything here?Anybody can help me?
Thanks
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden