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

# clearContent

> Clear all document body content, leaving a single empty paragraph.

## Summary

Clear all document body content, leaving a single empty paragraph.

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

## Expected result

Returns a Receipt with success status; reports NO\_OP if the document is already empty.

## Input fields

*No fields.*

### Example request

```json theme={null}
{}
```

## Output fields

### Variant 1 (success=true)

| Field | Type | Required | Description |
| - | - | - | - |
| `affectedStories` | StoryLocator\[] | no | |
| `id` | string | no | |
| `inserted` | EntityAddress\[] | no | |
| `invalidatedRefs` | AffectedRef\[] | no | |
| `remappedRefs` | AffectedRefRemapping\[] | no | |
| `removed` | EntityAddress\[] | no | |
| `success` | `true` | yes | Constant: `true` |
| `textRangeShifts` | TextRangeShift\[] | no | |
| `txId` | string | no | |
| `updated` | EntityAddress\[] | no | |

### Variant 2 (success=false)

| Field | Type | Required | Description |
| - | - | - | - |
| `failure` | object | yes | |
| `failure.code` | enum | yes | `"NO_OP"` |
| `failure.details` | any | no | |
| `failure.message` | string | yes | |
| `success` | `false` | yes | Constant: `false` |

### Example response

```json theme={null}
{
  "id": "id-001",
  "inserted": [
    {
      "entityId": "entity-789",
      "entityType": "comment",
      "kind": "entity"
    }
  ],
  "success": true
}
```

## Pre-apply throws

* `CAPABILITY_UNAVAILABLE`

## Non-applied failure codes

* `NO_OP`

## Raw schemas

> [accordion] Raw input schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {},
>   "type": "object"
> }
> ```

> [accordion] Raw output schema
>
> ```json theme={null}
> {
>   "oneOf": [
>     {
>       "$ref": "#/$defs/ReceiptSuccess"
>     },
>     {
>       "additionalProperties": false,
>       "properties": {
>         "failure": {
>           "additionalProperties": false,
>           "properties": {
>             "code": {
>               "enum": [
>                 "NO_OP"
>               ]
>             },
>             "details": {},
>             "message": {
>               "type": "string"
>             }
>           },
>           "required": [
>             "code",
>             "message"
>           ],
>           "type": "object"
>         },
>         "success": {
>           "const": false
>         }
>       },
>       "required": [
>         "success",
>         "failure"
>       ],
>       "type": "object"
>     }
>   ]
> }
> ```

> [accordion] Raw success schema
>
> ```json theme={null}
> {
>   "$ref": "#/$defs/ReceiptSuccess"
> }
> ```

> [accordion] Raw failure schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "failure": {
>       "additionalProperties": false,
>       "properties": {
>         "code": {
>           "enum": [
>             "NO_OP"
>           ]
>         },
>         "details": {},
>         "message": {
>           "type": "string"
>         }
>       },
>       "required": [
>         "code",
>         "message"
>       ],
>       "type": "object"
>     },
>     "success": {
>       "const": false
>     }
>   },
>   "required": [
>     "success",
>     "failure"
>   ],
>   "type": "object"
> }
> ```


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