Displaying HTML in an NSTextView
Displaying HTML in an NSTextView
- Subject: Displaying HTML in an NSTextView
- From: Graham <email@hidden>
- Date: Fri, 6 May 2005 17:20:20 -0400
Hi,
I have an NSTextView subclass that I wish to use to display HTML. The HTML comes from a String and not a URL. I cannot work out the correct way to do this.
I think I need to do something like this in my NSTextView subclass:
NSMutableAttributedString str=new NSMutableAttributedString(new NSData(myHTMLString.getBytes()), new NSMutableDictionary(new NSDictionary(NSAttributedString.NSHTMLTextDocumentType, NSAttributedString.NSDocFormatTextDocumentType))); textStorage().setAttributedString(str);
but it doesn't render the html (such as hyperlinks). I know I don't have the mutable string constructor correct.
Any hints in Java or Obj-C would be great.
Thanks
Graham |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden