Skip to content

@jsvision/ui / EditorCommands

Variable: EditorCommands

const EditorCommands: object

Defined in: ui/src/editor/editor-actions.ts:29

The app-level editor command names. Bind these from a menu or the status line; the focused Editor handles them. Save and Save-as are not here — they belong to the file-backed editor in @jsvision/files.

Type Declaration

clear

readonly clear: "clear" = 'clear'

Delete the current selection.

find

readonly find: "find" = 'find'

Open the Find dialog.

replace

readonly replace: "replace" = 'replace'

Open the Replace dialog.

searchAgain

readonly searchAgain: "searchAgain" = 'searchAgain'

Repeat the last search.

Example

ts
import { menuBar, subMenu, item, EditorCommands } from '@jsvision/ui';

const search = subMenu('~S~earch', [
  item('~F~ind...', EditorCommands.find),
  item('~R~eplace...', EditorCommands.replace),
  item('~S~earch again', EditorCommands.searchAgain),
]);