Hello, Im creating an HTMLString form a NSTextView like this:
NSArray * exclude = [NSArray arrayWithObjects:@"doctype", @"html", @"head", @"body",@"xml",nil]; NSDictionary * htmlAtt = [NSDictionary dictionaryWithObjectsAndKeys:NSHTMLTextDocumentType,NSDocumentTypeDocumentAttribute,exclude,NSExcludedElementsDocumentAttribute,nil]; NSError * error; NSData * htmlData = [_mString dataFromRange:NSMakeRange(0, [_mString length]) documentAttributes:htmlAtt error:&error]; NSString * sdat = [[[NSString alloc] initWithData:htmlData encoding:NSUTF8StringEncoding] autorelease]; andIts being created perfectly. now I need to do the inverse operation.. and Im doping the follwoing: NSDictionary * attributesOfString; NSArray * exclude = [NSArray arrayWithObjects:@"doctype", @"html", @"head", @"body",@"xml",nil]; NSDictionary * htmlAtt = [NSDictionary dictionaryWithObjectsAndKeys:NSHTMLTextDocumentType,NSDocumentTypeDocumentOption,exclude,NSExcludedElementsDocumentAttribute,nil]; NSAttributedString * valueString = [[NSAttributedString alloc] initWithHTML:[[specificComponent objectValue] dataUsingEncoding:NSUTF8StringEncoding] options:htmlAtt documentAttributes:&attributesOfString]; [(XWSDefaultComponentView *)[component view] setTypingAttributes:attributesOfString]; [(XWSDefaultComponentView *)[component view] setString:[valueString string]]; But when I display the NSTextViuew all the string its without any style, no bold, no colors no nothing.. Any ideas what might I being doing wrong? Thanks a lot. Gustavo _______________________________________________ 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 arch...@mail-archive.com