Re: NSAttributedString can't initWithHTML
Re: NSAttributedString can't initWithHTML
- Subject: Re: NSAttributedString can't initWithHTML
- From: Douglas Davidson <email@hidden>
- Date: Wed, 24 Jan 2007 14:53:30 -0800
On Jan 24, 2007, at 2:49 PM, John Stiles wrote:
On Jan 24, 2007, at 2:36 PM, Douglas Davidson wrote:
NSAttributedString uses WebKit for its HTML import. Please file a
bug if you encounter HTML that it cannot handle. (As a side note,
you can definitely use a WebView with non-file data. Call the
main frame with loadData:MIMEType:textEncodingName:baseURL: and
let the run loop run.)
BTW, when using this technique, how do you handle ancillary files
like images or CSS data?
By default, WebKit will load them. Supply an
NSWebResourceLoadDelegate to control this. If you want to package
the resources with the HTML, use a WebArchive; WebKit has APIs for
creating them, and you can call the main frame with loadArchive: to
load one. There are also a number of other web delegates that you
may want to supply, such as a frame load delegate and a policy delegate.
Douglas Davidson
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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