> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-caio-pizzol-docs-ai-core-preset.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# getHtml

> Extract the document content as an HTML string.

## Summary

Extract the document content as an HTML string.

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

## Expected result

Returns the full document content as an HTML-formatted string.

## Input fields

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

### Example request

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

## 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 title="Raw input schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "in": {
        "$ref": "#/$defs/StoryLocator"
      },
      "unflattenLists": {
        "description": "When true, flattens nested list structures in output. Default: false.",
        "type": "boolean"
      }
    },
    "type": "object"
  }
  ```
</Accordion>

<Accordion title="Raw output schema">
  ```json theme={null}
  {
    "type": "string"
  }
  ```
</Accordion>
