The NSText​View​Delegate protocol defines the optional methods implemented by delegates of NSText​View objects.


Accessing Text System Objects

func undo​Manager(for:​ NSText​View)

Returns the undo manager for the specified text view.

Supporting Quick Look

func text​View(NSText​View, url​For​Contents​Of:​ NSText​Attachment, at:​ Int)

Returns a URL representing the document contents for a text attachment.

Managing the Pasteboard

Setting Text Attributes

Control Sharing Service Picker

Performing Commands

func text​View(NSText​View, do​Command​By:​ Selector)

Sent to allow the delegate to perform the command for the text view.

Contextual Menu Management

func text​View(NSText​View, menu:​ NSMenu, for:​ NSEvent, at:​ Int)

Allows delegate to control the context menu returned by the text view.