NSTextView (Plain Text) and the Pasteboard: PasteboardType.string Is Not Handled
For a plain text (not rich text/RTF) NSTextView
, I found that: Since NSTextView
doesn’t understand the NSPasteboard.PasteboardType.string
pasteboard type for reading or writing, I tried two approaches to handle plain text input (pasting) and output (cut/copy): The backport seems to work, but extending supported types sounds like more robust solution.
TIL: How to Make NSTextView Reject Newlines
Today I learned that a NSWindow
’s field editor cannot trivially be set to “single line mode.” A field editor is a NSText
subclass like NSTextView
, but NSTextField
is only a configurable widget that uses the field editor. How does the “single line mode” setting do what it does? I have no clue.