Preserving Text Color in NSTextView.
Preserving Text Color in NSTextView.
- Subject: Preserving Text Color in NSTextView.
- From: Manish Pattath <email@hidden>
- Date: Thu, 10 Jun 2004 13:15:58 +0100 (BST)
Hi,
I am using NSTextView for displaying HTML content. Now the HTML file has some words which are red in color. But when the HTML is finally shown in NSTextView, the words originally in Red color are shown in Black Color.
This is what I am doing.
NSAttributedString* attrString = NULL;
attrString = [[NSAttributedString alloc] initWithHTML:pData baseURL:url documentAttributes:nil];
if(attrString != NULL)
{
[[theTextView textStorage] setAttributedString:attrString];
[attrString release];
}
How can I preserve the color of the text in the HTML files while converting into attributed string and showing in NSTextView? Any help in this regard will be helpful.
Thanks.
with rgds,
pmanish
Yahoo! India Matrimony: Find your partner online.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.