• 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: Extract plain text content from a Text View
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Extract plain text content from a Text View


  • Subject: Re: Extract plain text content from a Text View
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 16 Oct 2009 21:18:16 -0700


On Oct 16, 2009, at 3:42 PM, Ian Piper wrote:

The Text View is simply used as a place for the user to put any rich text and or images. Is there a way either to search or to get all of the plain text out from such a Text View? It's probably a simplistic question and I rather suspect that ultimately the answer is no!

NSTextView (and its parent class NSText) have methods for doing find and replace, which is what the commands in the Find submenu are wired up to. They even select the target text, scroll to it and blink it for you.


If that's too high level, just get the string property of the NSTextStorage and use NSString methods for searching for substrings.

—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


  • Follow-Ups:
    • Re: Extract plain text content from a Text View
      • From: Ian Piper <email@hidden>
References: 
 >Extract plain text content from a Text View (From: Ian Piper <email@hidden>)
 >Re: Extract plain text content from a Text View (From: "I. Savant" <email@hidden>)
 >Re: Extract plain text content from a Text View (From: "I. Savant" <email@hidden>)
 >Re: Extract plain text content from a Text View (From: Ian Piper <email@hidden>)

  • Prev by Date: Re: Sqlite and Core Data
  • Next by Date: Re: UITextField formatting for IP Address
  • Previous by thread: Re: Extract plain text content from a Text View
  • Next by thread: Re: Extract plain text content from a Text View
  • Index(es):
    • Date
    • Thread