Re: Saving NSAttributedString to a File
Re: Saving NSAttributedString to a File
- Subject: Re: Saving NSAttributedString to a File
- From: Jens Alfke <email@hidden>
- Date: Fri, 19 Dec 2014 14:00:03 -0800
> On Dec 19, 2014, at 1:39 PM, Charles Jenkins <email@hidden> wrote:
>
> But when it comes time to save to a file format selected from AppKit additions (e.g. RTFFromRange:documentAttributes:), any unusual, application-specific attributes will be lost. There is no built-in file format you can select that will save just any arbitrarily named attribute.
>
> Am I right?
Yes, as far as I know. How would AppKit store your arbitrary attributes into an HTML document? It would have to be a nasty hack like adding a magic HTML attribute (like "nsattributedstringmetadata") whose value was a base64 string of an NSArchive of the attribute dictionary. O_o
—Jens
_______________________________________________
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