Re: Extract plain text content from a Text View
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