Re: Lifting anchors
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