---
title: "init(rawValue:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/nsattributedstring/documenttype/init(rawvalue:)"
---

# init(rawValue:)

Creates a document type with the specified raw value.

## Declaration

```swift
init(rawValue: String)
```

## See Also

### Initializers

- [init(_:)](foundation/nsattributedstring/documenttype/init(_:).md)
