---
title: "copy(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstext/copy(_:)"
---

# copy(_:)

This action method copies the selected text onto the general pasteboard, in as many formats as the receiver supports.

## Declaration

```swift
func copy(_ sender: Any?)
```

## Discussion

Discussion A plain text object uses NSStringPboardType for plain text, and a rich text object also uses NSRTFPboardType.

## See Also

### Action methods for editing

- [selectAll(_:)](appkit/nstext/selectall(_:).md)
- [cut(_:)](appkit/nstext/cut(_:).md)
- [paste(_:)](appkit/nstext/paste(_:).md)
- [copyFont(_:)](appkit/nstext/copyfont(_:).md)
- [pasteFont(_:)](appkit/nstext/pastefont(_:).md)
- [copyRuler(_:)](appkit/nstext/copyruler(_:).md)
- [pasteRuler(_:)](appkit/nstext/pasteruler(_:).md)
- [delete(_:)](appkit/nstext/delete(_:).md)
