@jsvision/ui / EditorCommands
Variable: EditorCommands
constEditorCommands: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
readonlyclear:"clear"='clear'
Delete the current selection.
find
readonlyfind:"find"='find'
Open the Find dialog.
replace
readonlyreplace:"replace"='replace'
Open the Replace dialog.
searchAgain
readonlysearchAgain:"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),
]);