Issue #320
Scrollable
- Putting an NSTextView Object in an NSScrollView
- Use xib then load
Embed image or NSTextAttachmentCellProtocol
- Select TextView
- Select
Rich Text
andGraphics
- Select Size Inspector -> Resizable and tick both Horizontally and Vertically
Customize
scrollView.drawsBackground = false
textView.drawsBackground = false
textView.string = "What's on your mind?"
textView.delegate = self
textView.selectedTextAttributes = [
NSAttributedString.Key.backgroundColor: NSColor(hex: "414858"),
NSAttributedString.Key.foregroundColor: NSColor(hex: "ACB2BE")
]
extension MainView: NSTextViewDelegate {
func textViewDidChangeSelection(_ notification: Notification) {
// Change text color again after image dragging
}
}