Converting RTFD to HTML
Converting RTFD to HTML
- Subject: Converting RTFD to HTML
- From: Paul Kim <email@hidden>
- Date: Tue, 5 Feb 2008 12:39:46 -0500
I'm playing with doing a QuickLook generator. I have RTFD data
(pasteboard-style with attachments inline) which I can load into an
NSAttributedString.
Unfortunately, QL does not accept RTFD as a native type (RTF and HTML
are acceptable though). While I can use -
dataFromRange:documentAttributes:error: to convert to HTML, it doesn't
handle the attachments in a format that the QL side can digest.
QLPreviewRequestSetDataRepresentation() requires the HTML to refer to
attachments using "cid" type URLs.
Is there a way to get this out of NSAttributedString? Am I going about
this the wrong way? Do I need to parse the HTML and munge all the
URLs, figure out all the MIME types for the attachments and report
those to the QL-side, etc.?
And yes, I know I can also render the RTFD into a context but you
don't get the scrollable view that you do if you hand the data over in
a text based format.
Thanks,
Paul Kim
_______________________________________________
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