Re: I know I've done this before...
Re: I know I've done this before...
- Subject: Re: I know I've done this before...
- From: Scott Anguish <email@hidden>
- Date: Tue, 12 Jun 2001 01:27:15 -0400
On Monday, June 11, 2001, at 07:51 PM, John C. Randolph wrote:
I know I've done this before, but I don't recall how to insert an
NSAttributedString into an NSTextView, preserving its formatting. Do I
have to stick it in the pasteboard first?
You can get the NSMutableAttributedString from the NSTextView (the
NSTextStorage) and then append it to the storage...
I think you might need to then inform the text storage of the
change using - (void)edited:(unsigned)mask range:(NSRange)oldRange
changeInLength:(int)lengthChange) but hopefully Ali will read this and
say for sure.