---
title: documentContextBeforeInput
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitextdocumentproxy/documentcontextbeforeinput
---

# documentContextBeforeInput

Textual context before the insertion point in the current text input object.

## Declaration

```swift
var documentContextBeforeInput: String? { get }
```

## Mentioned in

Handling text interactions in custom keyboards

## See Also

### Obtaining textual context around the insertion point

- [documentContextAfterInput](uikit/uitextdocumentproxy/documentcontextafterinput.md)
