• 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: how to save styled text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to save styled text


  • Subject: Re: how to save styled text
  • From: Sascha Kuehn <email@hidden>
  • Date: Mon, 16 Feb 2004 21:46:22 +0100

is it possible to convert the styled text to HTML code and back to styled text?

sascha

On 16. Feb 2004, at 16:43 Uhr, Fritz Anderson wrote:

The content of an NSTextView can be accessed by the method textContent, which will give you an NSTextStorage.

NSTextStorage, as a subclass of NSAttributedString, can fully archive and unarchive its contents to NSData by RTFDFromRange:documentAttributes: and initWithRTFD:documentAttributes:.

NSData is easily saved in a file.

The easiest way to discover this sort of thing, I've found, is to browse the class-level documentation. The free application AppKiDo is particularly good for this. Get it at <http://homepage.mac.com/aglee/downloads> and give it a try.

-- F

On 16 Feb 2004, at 8:25 AM, Sascha Kuehn wrote:

i have a text view with text in different colors, fonts, sizes and even pictures.
how can i save this styled text in a file without loosing the style of the text.
and how can i get the saved styled text back into the text view with all the fonts, colors and pictures?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >how to save styled text (From: Sascha Kuehn <email@hidden>)
 >Re: how to save styled text (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: Slow Cocoa
  • Next by Date: creating an NSImage from an NSMovie
  • Previous by thread: Re: how to save styled text
  • Next by thread: Re: how to save styled text
  • Index(es):
    • Date
    • Thread