# DocumentCompareSnapshot

interface

The captured before-state of a document plus the metadata to reconcile changes later. The snapshot is a plain object and is safe to `JSON.stringify`, send between the frontend and backend, store, parse, and later feed back into `DocumentCompare#diffSnapshot`.

<a id="properties">

## Properties

<a id="member-channelId">

### `channelId: string`

The collaboration channel the snapshot was captured from.

<a id="member-content">

### `content: Record<string, string>`

Each root's content, serialized to HTML, keyed by root name (excluding `$graveyard`).

<a id="member-editorConfig">

### `editorConfig: AIEditorConfig`

The editor's feature configuration at capture time, so external processing can interpret the serialized HTML within the editor's capabilities.

<a id="member-selection">

### `selection: Record<string, Array<DocumentCompareSnapshotRange>>`

Each root's captured selection as character offsets into its HTML, keyed by root name (omitted if root has no selection).

<a id="member-sessionId">

### `sessionId: string`

The editing session the snapshot was captured in.

<a id="member-version">

### `version: number`

The document version the snapshot was captured at.

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
