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

# outline(_:)

Adds the outline attribute to the selected text attributes if absent; removes the attribute if present.

## Declaration

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

## Parameters

- `sender`: The control that sent the message; may be nil.

## Discussion

Discussion If there is a selection and the first character of the selected range has a non-zero stroke width, or if there is no selection and the typing attributes have a non-zero stroke width, then the stroke width is removed; otherwise the value of NSStrokeWidthAttributeName is set to the default value for outline (3.0). Operates on the selected range if the receiver contains rich text. For plain text the range is the entire contents of the receiver.

## See Also

### Setting behavioral attributes

- [allowsUndo](appkit/nstextview/allowsundo.md)
- [isEditable](appkit/nstextview/iseditable.md)
- [isSelectable](appkit/nstextview/isselectable.md)
- [isFieldEditor](appkit/nstextview/isfieldeditor.md)
- [isRichText](appkit/nstextview/isrichtext.md)
- [importsGraphics](appkit/nstextview/importsgraphics.md)
- [setBaseWritingDirection(_:range:)](appkit/nstextview/setbasewritingdirection(_:range:).md)
- [defaultParagraphStyle](appkit/nstextview/defaultparagraphstyle.md)
- [allowsImageEditing](appkit/nstextview/allowsimageediting.md)
- [isAutomaticQuoteSubstitutionEnabled](appkit/nstextview/isautomaticquotesubstitutionenabled.md)
- [toggleAutomaticQuoteSubstitution(_:)](appkit/nstextview/toggleautomaticquotesubstitution(_:).md)
- [isAutomaticLinkDetectionEnabled](appkit/nstextview/isautomaticlinkdetectionenabled.md)
- [toggleAutomaticLinkDetection(_:)](appkit/nstextview/toggleautomaticlinkdetection(_:).md)
- [displaysLinkToolTips](appkit/nstextview/displayslinktooltips.md)
- [isAutomaticTextCompletionEnabled](appkit/nstextview/isautomatictextcompletionenabled.md)
