---
title: parent
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextelement/parent
---

# parent

A value that represents the parent element if this text element is a child of an enclosing element.

## Declaration

```swift
weak var parent: NSTextElement? { get }
```

## See Also

### Accessing text elements

- [isRepresentedElement](appkit/nstextelement/isrepresentedelement.md)
- [childElements](appkit/nstextelement/childelements.md)
