---
title: "init(insertionPoint:typingAttributes:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/attributedtextselection/init(insertionpoint:typingattributes:)"
---

# init(insertionPoint:typingAttributes:)

Initialize a selection to a single insertion point.

## Declaration

```swift
init(insertionPoint: AttributedString.Index, typingAttributes: AttributeContainer? = nil)
```

## Parameters

- `insertionPoint`: The index of the string where the charet should be positioned.
- `typingAttributes`: The attributes for the next character that is typed, or nil if they should be inferred from the attributes on the text.
