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

# setAttributedMarkedText(_:selectedRange:)

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

## Declaration

```swift
func setAttributedMarkedText(_ markedText: NSAttributedString?, selectedRange: NSRange)
```
