# seedCollaborationDoc (@salmonui/rich-text/collab)

> The seedCollaborationDoc function of @salmonui/rich-text/collab: Seeds an empty Y.Doc with HTML (sanitized and parsed through the shared schema), on the server or by the first client. Seed a doc only once: an editor bound to a seeded doc renders the doc, not its own value. Loads the engine on demand, so the /collab entry stays small.

Canonical: https://salmonui.dev/docs/reference/rich-text/collab/seedCollaborationDoc

```ts
import { seedCollaborationDoc } from '@salmonui/rich-text/collab';
```

Entry index: https://salmonui.dev/docs/reference/rich-text/collab (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/rich-text/collab.md).

## Reference

Kind: function

```ts
function seedCollaborationDoc(doc: Y.Doc, html: string, options?: CollaborationHtmlOptions): Promise<void>;
```

Seeds an empty Y.Doc with HTML (sanitized and parsed through the shared
schema), on the server or by the first client. Seed a doc only once: an
editor bound to a seeded doc renders the doc, not its own `value`. Loads
the engine on demand, so the `/collab` entry stays small.
