• 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: Lifting anchors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lifting anchors


  • Subject: Re: Lifting anchors
  • From: John Labovitz <email@hidden>
  • Date: Sun, 19 Aug 2007 08:36:45 -0700

On Aug 19, 2007, at 5:28 AM, Gerriet M. Denkmann wrote:

I read an html document into an NSTextStorage using readFromURL:options:documentAttributes:error: - pictures and links get copied perfectly.
But no anchors.
This is not very surprising, as NSTextStorage seems not to have any notion of anchors.

By anchors, I presume you mean HTML tags like <a name="foo"> / <a href="#foo">, yes?


Perhaps WebKit would do this for you? You could certainly load a URL file into a WebView, then find the anchor elements using the DOM calls. Separately, you can extract the RTF(D?) data from that webview's frame. If you can correlate the location of those anchors with the elements in the text, you could add attributes to the textStorage representing those anchors.

However, the correlation is not obvious to me.

I wonder whether the HTML editing mode in WebKit might be a place to look?

--John
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >Lifting anchors (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Is this a bug of InterfaceBuilder?
  • Next by Date: Re: Is this a bug of InterfaceBuilder?
  • Previous by thread: Lifting anchors
  • Next by thread: Is this a bug of InterfaceBuilder?
  • Index(es):
    • Date
    • Thread