# clipboard.serializeSelection

> Serialize the current or supplied model selection into text/plain, text/html, and application/x-superdoc-v2-fragment clipboard payloads.



- Member path: `doc.clipboard.serializeSelection(…)`
- Mutates document: no
- Idempotency: `idempotent`
- Supports tracked mode: no
- Supports dry run: no

## Expected result

Returns a ClipboardSerializeResult containing the payload and normalized insert plan.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {},
  "type": "object",
  "properties": {
    "target": {
      "type": "object"
    },
    "includeHtml": {
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {},
  "type": "object",
  "properties": {
    "payload": {
      "type": "object"
    },
    "plan": {
      "type": "object"
    },
    "warnings": {
      "type": "array"
    }
  },
  "additionalProperties": false,
  "required": [
    "payload",
    "plan"
  ]
}
```

## Pre-apply throws

- None

## Non-applied receipt codes

- `INVALID_TARGET`
- `CAPABILITY_UNAVAILABLE`

