# EditorProviderOptions

Source: /tuil/docs/reference/packages/editor/api/editor-provider-options
Locale: en

interface exported by @mwillbanks/tuil-editor.



{/* Generated by tooling/docs/generate-reference.ts. */}

## interface [#interface]

Public interface exported by `@mwillbanks/tuil-editor`.

```ts
export interface EditorProviderOptions {
  readonly id?: string;
  readonly documentType?: string;
  readonly value?: string;
  readonly readOnly?: boolean;
  readonly masked?: boolean;
  readonly mode?: EditorMode;
  readonly viewportAnchor?: EditorPosition;
  readonly clipboard?: EditorClipboardAdapter;
  /**
   * Receives the unredacted document after a mutation.
   *
   * Masked sessions redact snapshots, serialization, and clipboard operations.
   * An owning control can use this explicit sink to synchronize its private
   * value without turning a general export API into a secret-recovery path.
   */
  readonly onDocumentChange?: (value: string) => void;
}
```

## Members [#members]

| Member             | Type                                     | Required | Description                                                                                                                                                                                                                                                                    | Related types                                                           |
| ------------------ | ---------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| `id`               | `string \| undefined`                    | No       | The `id` member uses the `string \| undefined` contract.                                                                                                                                                                                                                       | —                                                                       |
| `documentType`     | `string \| undefined`                    | No       | The `documentType` member uses the `string \| undefined` contract.                                                                                                                                                                                                             | —                                                                       |
| `value`            | `string \| undefined`                    | No       | The `value` member uses the `string \| undefined` contract.                                                                                                                                                                                                                    | —                                                                       |
| `readOnly`         | `boolean \| undefined`                   | No       | The `readOnly` member uses the `boolean \| undefined` contract.                                                                                                                                                                                                                | —                                                                       |
| `masked`           | `boolean \| undefined`                   | No       | The `masked` member uses the `boolean \| undefined` contract.                                                                                                                                                                                                                  | —                                                                       |
| `mode`             | `EditorMode \| undefined`                | No       | The `mode` member uses the `EditorMode \| undefined` contract.                                                                                                                                                                                                                 | [`EditorMode`](/tuil/docs/reference/packages/editor/api/editor-mode)         |
| `viewportAnchor`   | `EditorPosition \| undefined`            | No       | The `viewportAnchor` member uses the `EditorPosition \| undefined` contract.                                                                                                                                                                                                   | [`EditorPosition`](/tuil/docs/reference/packages/editor/api/editor-position) |
| `clipboard`        | `EditorClipboardAdapter \| undefined`    | No       | The `clipboard` member uses the `EditorClipboardAdapter \| undefined` contract.                                                                                                                                                                                                | —                                                                       |
| `onDocumentChange` | `((value: string) => void) \| undefined` | No       | Receives the unredacted document after a mutation.  Masked sessions redact snapshots, serialization, and clipboard operations. An owning control can use this explicit sink to synchronize its private value without turning a general export API into a secret-recovery path. | —                                                                       |

## Parameters [#parameters]

This declaration has no public members.

## Returns [#returns]

This declaration does not return a value.

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`EditorMode`](/tuil/docs/reference/packages/editor/api/editor-mode)
* [`EditorPosition`](/tuil/docs/reference/packages/editor/api/editor-position)

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/editor/src/index.ts)

## Package [#package]

[@mwillbanks/tuil-editor](/tuil/docs/reference/packages/editor)
