---
title: currentTextContainer
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstypesetter/currenttextcontainer
---

# currentTextContainer

Returns the text container for the text being typeset.

## Declaration

```swift
unowned(unsafe) var currentTextContainer: NSTextContainer? { get }
```

## Return Value

Return Value The text container for the text being typeset. This value is valid only while the typesetter is performing layout.

## See Also

### Managing text containers

- [textContainers](appkit/nstypesetter/textcontainers.md)
- [lineFragmentPadding](appkit/nstypesetter/linefragmentpadding.md)
