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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to