> ## Documentation Index
> Fetch the complete documentation index at: https://sdk.revise.io/llms.txt
> Use this file to discover all available pages before exploring further.

# <ReviseEditor />

> Every prop on the editor component.

```tsx theme={null}
import { ReviseEditor } from "@reviseio/sdk";
import "@reviseio/sdk/style.css";
```

## Documents

<ResponseField name="initialDocuments" type="readonly ReviseDocumentInput[]">
  Documents to open on mount. Each needs a host-owned `id` and a source. The
  source field is named `docx` but accepts DOCX, Markdown, plain text, and
  HTML — see [input formats](/guides/formats).
</ResponseField>

<ResponseField name="activeDocumentId" type="string | null">
  Controlled active document. Pair with `onActiveDocumentChange`.
</ResponseField>

<ResponseField name="defaultActiveDocumentId" type="string | null">
  Initial active document for uncontrolled use. Defaults to the first document.
</ResponseField>

## Behaviour

<ResponseField name="currentUser" type="EditorUserIdentity | null">
  Identity attached to comments and suggestions the user authors.
</ResponseField>

<ResponseField name="agent" type="ReviseAgentConfig">
  Backend, credentials, model, or a custom transport for the delegated agent.
  See [delegating to the Revise agent](/guides/delegated-agent).
</ResponseField>

<ResponseField name="defaultDocumentMode" type="&#x22;editing&#x22; | &#x22;suggesting&#x22; | &#x22;viewing&#x22;" default="&#x22;editing&#x22;">
  Seeds the mode for documents as they open. Not a controlled prop — use
  `view.setDocumentMode()` to change a live document.
</ResponseField>

<ResponseField name="defaultZoom" type="number | 'fit-width'" default="fit-width">
  Initial zoom.
</ResponseField>

<ResponseField name="defaultCommentsOpen" type="boolean" default="true">
  Whether the comments panel starts open.
</ResponseField>

<ResponseField name="autoFocus" type="boolean" default="true">
  Take keyboard focus when a document becomes active. Set `false` when the
  editor sits inside a larger page and should wait for a click.
</ResponseField>

<ResponseField name="fonts" type="readonly ReviseFontDefinition[]">
  Fonts added to the native picker. Loading the font files remains yours.
</ResponseField>

## Chrome

<ResponseField name="toolbarMode" type="&#x22;native&#x22; | &#x22;none&#x22;" default="&#x22;native&#x22;">
  Render Revise's ribbon, or nothing at all.
</ResponseField>

<ResponseField name="showTitleBar" type="boolean" default="true">
  The bar above the ribbon: editable title, optional mode toggle, Review.
</ResponseField>

<ResponseField name="showTabs" type="boolean" default="false">
  Built-in tab strip, one tab per open document.
</ResponseField>

<ResponseField name="showDocumentModeToggle" type="boolean" default="false">
  Show the Editing/Suggesting toggle in the title bar.
</ResponseField>

<ResponseField name="onNewTab" type="() => void">
  Adds a "+" button to the tab strip. Without it, no button renders.
</ResponseField>

## Appearance

<ResponseField name="theme" type="&#x22;light&#x22; | &#x22;dark&#x22;">
  Scoped to this editor. Defaults to the host page's theme.
</ResponseField>

<ResponseField name="canvasBackground" type="string">
  The area behind the page. Any CSS background.
</ResponseField>

<ResponseField name="pageBackground" type="string">
  The paper itself. Any CSS colour.
</ResponseField>

<ResponseField name="pageBorderColor" type="string">
  The outline around each page. Any CSS colour.
</ResponseField>

<ResponseField name="className" type="string" />

<ResponseField name="style" type="React.CSSProperties" />

## Callbacks

<ResponseField name="onReady" type="(editor: ReviseEditorHandle) => void">
  Fires once the editor is mounted. This is where you keep the handle.
</ResponseField>

<ResponseField name="onDocumentReady" type="(document: ReviseDocumentHandle) => void">
  Fires per document, once it has parsed and is ready to read or edit.
</ResponseField>

<ResponseField name="onChange" type="(documentId: string, document: DocRoot) => void">
  Any content change, from the user, your UI, or an agent. Debounce before
  persisting.
</ResponseField>

<ResponseField name="onDocumentsChange" type="(state: ReviseDocumentCollectionState) => void">
  The open-document collection changed.
</ResponseField>

<ResponseField name="onActiveDocumentChange" type="(documentId: string | null) => void" />

<ResponseField name="onDocumentTitleChange" type="(documentId: string, title: string) => void" />

<ResponseField name="onDocumentModeChange" type="(documentId: string, mode: ReviseDocumentMode) => void" />

<ResponseField name="onZoomChange" type="(documentId: string, zoom: ReviseZoom) => void" />

<ResponseField name="onAgentEvent" type="(documentId: string, event: ReviseAgentEvent) => void" />

<ResponseField name="onError" type="(error: Error, documentId?: string) => void">
  Parse failures and runtime errors. Documents that fail to open also surface
  as `status: "error"` in the collection state.
</ResponseField>

## Helpers

<ResponseField name="createEmptyDocx()" type="Promise<Blob>">
  A blank DOCX, for "New document" actions.

  ```ts theme={null}
  import { createEmptyDocx } from "@reviseio/sdk";
  ```
</ResponseField>
