• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSAttributedString can't initWithHTML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSAttributedString can't initWithHTML (From: Falko <email@hidden>)
 >Re: NSAttributedString can't initWithHTML (From: Douglas Davidson <email@hidden>)
 >Re: NSAttributedString can't initWithHTML (From: John Stiles <email@hidden>)

  • Prev by Date: Re: NSAttributedString can't initWithHTML
  • Next by Date: Re: bug? NSPersistentDocument Core Data Tutorial
  • Previous by thread: Re: NSAttributedString can't initWithHTML
  • Next by thread: tableViewSelectionDidChange Not Called After Window Closed
  • Index(es):
    • Date
    • Thread