> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superdoc.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# getText

> Extract the plain-text content of the document.

## Summary

Extract the plain-text content of the document.

* Operation ID: `getText`
* API member path: `editor.doc.getText(...)`
* Mutates document: `no`
* Idempotency: `idempotent`
* Supports tracked mode: `no`
* Supports dry run: `no`
* Deterministic target resolution: `yes`

## Expected result

Returns the full plain-text content of the document as a string.

## Input fields

| Field | Type | Required | Description |
| - | - | - | - |
| `in` | StoryLocator | no | StoryLocator |

### Example request

```json theme={null}
{
  "in": {
    "kind": "story",
    "storyType": "body"
  }
}
```

## Output fields

*No fields.*

### Example response

```json theme={null}
"example"
```

## Pre-apply throws

* `STORY_NOT_FOUND`
* `STORY_MISMATCH`
* `STORY_NOT_SUPPORTED`
* `CROSS_STORY_PLAN`
* `MATERIALIZATION_FAILED`

## Non-applied failure codes

* None

## Raw schemas

> [accordion] Raw input schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "in": {
>       "$ref": "#/$defs/StoryLocator"
>     }
>   },
>   "type": "object"
> }
> ```

> [accordion] Raw output schema
>
> ```json theme={null}
> {
>   "type": "string"
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.