EditorSnapshot
interface exported by @mwillbanks/tuil-editor.
interface
Public interface exported by @mwillbanks/tuil-editor.
export interface EditorSnapshot {
readonly document: EditorDocument;
readonly selections: readonly EditorSelection[];
readonly decorations: readonly EditorDecoration[];
readonly diagnostics: readonly EditorDiagnostic[];
readonly mode: EditorMode;
readonly readOnly: boolean;
readonly canUndo: boolean;
readonly canRedo: boolean;
readonly viewportAnchor?: EditorPosition;
}Members
| Member | Type | Required | Description | Related types |
|---|---|---|---|---|
document | EditorDocument | Yes | The document member uses the EditorDocument contract. | EditorDocument |
selections | readonly EditorSelection[] | Yes | The selections member uses the readonly EditorSelection[] contract. | EditorSelection |
decorations | readonly EditorDecoration[] | Yes | The decorations member uses the readonly EditorDecoration[] contract. | EditorDecoration |
diagnostics | readonly EditorDiagnostic[] | Yes | The diagnostics member uses the readonly EditorDiagnostic[] contract. | EditorDiagnostic |
mode | EditorMode | Yes | The mode member uses the EditorMode contract. | EditorMode |
readOnly | boolean | Yes | The readOnly member uses the boolean contract. | — |
canUndo | boolean | Yes | The canUndo member uses the boolean contract. | — |
canRedo | boolean | Yes | The canRedo member uses the boolean contract. | — |
viewportAnchor | EditorPosition | undefined | No | The viewportAnchor member uses the EditorPosition | undefined contract. | EditorPosition |
Parameters
This declaration has no public members.
Returns
This declaration does not return a value.
Throws
No thrown errors are documented for this declaration.
Related types
Source
View the secondary source reference