Re: NSTextView to HTML (or XHTML)
Re: NSTextView to HTML (or XHTML)
- Subject: Re: NSTextView to HTML (or XHTML)
- From: Keith Blount <email@hidden>
- Date: Mon, 24 Jul 2006 12:28:55 -0700 (PDT)
Try using NSHTMLTextDocumentType with
NSDocumentTypeDocumentOption in the attributes
dictionary in the method you mention. You will lose
things like images (which is unfortunately true for
every format except RTFD), but basic formatting should
be retained. Hope that helps.
Keith
--- ORIGINAL MESSAGE ---
There are routines to convert NSTextViews to RTF/RTFD,
and inport
RTF/RTFD/HTML. However, I don't see anything that
EXPORTs/saves to HTML (or
XHTML). I have some pretty simple (bold/plain style)
NSAttributedText
that I'd like to export to XHMTL. The text may be
UTF-16 (Japanese) or
UTF-8 (US, etc).
The closest I've seen for exporting seems to be
NSAttributedText's
dataFromRange:documentAttributes:error:, possible
using
NSExcludedElementsDocumentAttribute string (I'm OK
with 10.4-only).
Is this the right direction to go? Can anyone point me
to any example
code (I couldn't seem to find any in my net
searching)?
Thanks!
Mark
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden