<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/AttributedTextSelection/init(insertionPoint:typingAttributes:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI23AttributedTextSelectionV14insertionPoint16typingAttributesAC10Foundation0C6StringV5IndexV_AF18AttributeContainerVSgtcfc"
  },
  "title" : "init(insertionPoint:typingAttributes:)"
}
-->

# init(insertionPoint:typingAttributes:)

Initialize a selection to a single insertion point.

```
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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)