• 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: Help Please?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help Please?


  • Subject: Re: Help Please?
  • From: email@hidden
  • Date: Wed, 6 Mar 2002 22:36:06 -0800

I need the text field to render the source that is in it like a web
page, all I need is the basic formatting, images, styles and
clickable links. No fancy forms stuff or anything is needed.

Is this possible in Cocoa? Could someone give me a snippet of code
to help? I can not make head nor tails of the Apple Developer Docs.

You probably want to use the NSAttributedString init methods that can handle HTML. Since you're fetching over the web, my guess is you want:

- (id)initWithHTML:(NSData *)data baseURL:(NSURL *)anURL documentAttributes:(NSDictionary **)docAttributes;

See NSAttributedString.h (the one in AppKit, not the one in Foundation) and the associated doc for more information. Source code may have been posted here before, this is a common topic for questions. Try searching the list archives for something like "initWithHTML". Good luck.

Ben Haller
Stick Software
_______________________________________________
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.

  • Prev by Date: Re: Filename of File Relative to Directory It's In
  • Next by Date: Re: Filename of File Relative to Directory It's In
  • Previous by thread: Re: Help Please?
  • Next by thread: RE: Help Please?
  • Index(es):
    • Date
    • Thread