---
title: "setMarkedText(_:selectedRange:)"
framework: browserenginekit
role: symbol
role_heading: Instance Method
path: "browserenginekit/betextinput/setmarkedtext(_:selectedrange:)"
---

# setMarkedText(_:selectedRange:)

Inserts the provided text and marks it to indicate that it is part of an active input session.

## Declaration

```swift
func setMarkedText(_ markedText: String?, selectedRange: NSRange)
```
