Skip to content

@jsvision/ui / EditorOptions

Interface: EditorOptions

Defined in: ui/src/editor/editor-types.ts:23

Construction options for Editor. Every field is optional — a bare new Editor() is fully usable.

Extended by

Properties

autoIndent?

optional autoIndent?: boolean

Defined in: ui/src/editor/editor-types.ts:38

Copy the previous line's leading whitespace when pressing Enter (default false).


clipboard?

optional clipboard?: Editor

Defined in: ui/src/editor/editor-types.ts:32

An optional editor that exposes clipboard contents.

The application event loop owns the canonical clipboard, so ordinary in-app Cut/Copy/Paste works without this option. Pass the same Editor instance when an application needs a visible projection, as in the editor demonstration. Editing the projection does not replace the canonical value until the edited text is explicitly copied.


commands?

optional commands?: EditorCommandSeam

Defined in: ui/src/editor/editor-types.ts:42

Hook for greying out editing commands as selection/undo state changes (default: none).


editorDialog?

optional editorDialog?: EditorDialogHandler

Defined in: ui/src/editor/editor-types.ts:34

Handler for find/replace/save prompts. Defaults to a handler that cancels every prompt.


keyBindings?

optional keyBindings?: EditorKeyBindings

Defined in: ui/src/editor/editor-types.ts:44

Editor key set — 'modern' (default) overlays Ctrl+X/C/V/A; 'wordstar' = the classic WordStar layout.


overwrite?

optional overwrite?: boolean

Defined in: ui/src/editor/editor-types.ts:40

Start in overwrite mode; Insert toggles it (default false = insert mode).


undoDepth?

optional undoDepth?: number

Defined in: ui/src/editor/editor-types.ts:36

Maximum retained undo steps (default 1000).