Skip to content

Type Alias: Command ​

ts
type Command = (state, dispatch?, view?) => boolean;

A ProseMirror command. Command factories such as toggleBold() return one; pass it to editor.run() or editor.can().

Parameters ​

ParameterType
stateEditorState
dispatch?(tr) => void
view?EditorView

Returns ​

boolean