How can I prevent attributes to be pasted into my text view along with the text?
How can I prevent attributes to be pasted into my text view along with the text?
- Subject: How can I prevent attributes to be pasted into my text view along with the text?
- From: Marc Liyanage <email@hidden>
- Date: Sun, 30 Mar 2003 22:26:40 +0200
Hi,
I have a custom NSTextView subclass which is used to edit code in a
monospace font of a fixed size.
I do not want the user to mess with the font settings of that text view.
Unfortunately, if the user uses copy/paste to paste a snippet of text,
the attributes are pasted along and this messes up the font settings.
Instead of all monospace text of the exact same size, I now have a mix.
Can I somehow force the NSTextView to strip any attributes from pasted
text, leaving only the raw data?
Do I have to override functions of some object along the responder
chain, or is there an easier way with less work?
I tried setting -isRichText:NO on the text view, but that doesn' help
and I'm not even sure if I really understood its purpose.
Cheers
-Marc
_________________________________________________________________
Marc Liyanage email@hidden
http://www.entropy.ch
ICQ 5077985
Yoda I am. Grammar I can't.
_________________________________________________________________
_______________________________________________
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.