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

# Other classes: Editor

## `ComponentViews`

Live views of every component `defs` defines; `destroy` unmounts them.

Import from `@reductoai/docx-editor`.

### `ComponentViews.commit()`

```ts theme={null}
commit<S>(key: string, next: S): Promise<void>
```

New state for a component; its fallback is drawn again.

### `ComponentViews.destroy()`

```ts theme={null}
destroy(): void
```

### `ComponentViews.list()`

```ts theme={null}
list(): ComponentInfo[]
```

Components of the open document, in document order.

## `EditorUi`

Import from `@reductoai/docx-editor`, `@reductoai/docx-editor/model`. Extends [`Observable`](https://docs.reducto.ai/office/docx/api/editor-panels#observable).

### EditorUi properties

| Name | Type | Description |
| - | - | - |
| `altDialog` | `{ open: boolean; value: string } & Observable` | read-only |
| `aspectLock` | `{ on: boolean } & Observable` | read-only The toolbar and the inspector both toggle it. |
| `authorDialog` | `{ open: boolean; value: string } & Observable` | read-only |
| `chartPick` | `{ pick: ChartPick \| null } & Observable` | read-only The chart element a click on the selected chart picked, for the Format pane. |
| `contextMenu` | `ContextMenuStore` | read-only |
| `datePicker` | `{ align: "start" \| "end"; id: string; open: boolean; x: number; y: number } & Observable` | read-only The calendar under a date picker control: the control's id, the viewport point it hangs from and which edge meets it. |
| `fieldShading` | `{ mode: FieldShading } & Observable` | read-only Word's Field shading option; "When selected" is its default. |
| `formatMarks` | `{ on: boolean } & Observable` | read-only Word's Show ¶. |
| `goToDialog` | `{ open: boolean; value: string } & Observable` | read-only |
| `inspectorFolds` | `{ closed: readonly string[] } & Observable` | read-only Format panel sections the user folded, by title. |
| `keybindings` | `{ open: boolean } & Observable` | read-only The Keyboard Shortcuts window. |
| `linkDialog` | `{ hasText: boolean; open: boolean; text: string; url: string } & Observable` | read-only |
| `palette` | `PaletteStore<string>` | read-only The built-in command palette; a host that has its own rebinds `palette.open`. |
| `version` | `number` | Bumps on every change of this object or an adopted child. |

### `EditorUi.observes()`

```ts theme={null}
observes(key: string): boolean
```

### `EditorUi.openAltDialog()`

```ts theme={null}
openAltDialog(current: string): void
```

### `EditorUi.openAuthorDialog()`

```ts theme={null}
openAuthorDialog(current: string): void
```

### `EditorUi.openKeybindings()`

```ts theme={null}
openKeybindings(): void
```

### `EditorUi.stampOf()`

```ts theme={null}
stampOf(key: string): number
```

### `EditorUi.subscribe()`

```ts theme={null}
subscribe(listener: Listener, key?: string): Unsubscribe
```

Listen to one key, or to every change (including adopted children) when `key` is omitted.
