---
title: markedTextRange
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uitextinput/markedtextrange
---

# markedTextRange

The range of currently marked text in a document.

## Declaration

```swift
var markedTextRange: UITextRange? { get }
```

## Discussion

Discussion If there is no marked text, the value of the property is nil. Marked text is provisionally inserted text that requires user confirmation; it occurs in multistage text input. The current selection, which can be a caret or an extended range, always occurs within the marked text.

## See Also

### Working with marked and selected text

- [selectedTextRange](uikit/uitextinput/selectedtextrange.md)
- [markedTextStyle](uikit/uitextinput/markedtextstyle.md)
- [setMarkedText(_:selectedRange:)](uikit/uitextinput/setmarkedtext(_:selectedrange:).md)
- [setAttributedMarkedText(_:selectedRange:)](uikit/uitextinput/setattributedmarkedtext(_:selectedrange:).md)
- [unmarkText()](uikit/uitextinput/unmarktext().md)
- [selectionAffinity](uikit/uitextinput/selectionaffinity.md)
