readSelection(from:)
Reads the text view’s preferred type of data from the specified pasteboard.
Declaration
func readSelection(from pboard: NSPasteboard) -> BoolParameters
- pboard:
The pasteboard to read from.
Return Value
Discussion
This method invokes the preferredPasteboardType(from:restrictedToTypesFrom:) method to determine the text view’s preferred type of data and then reads the data using the readSelection(from:type:) method.
You should not need to override this method. You might need to invoke this method if you are implementing a new type of pasteboard to handle services other than copy/paste or dragging.