Minor Changes
-
24f8341: - Change the signature of
CommandFunction
to only accept one parameter which contains
dispatch
,view
,state
.- Create a new exported
ProsemirrorCommandFunction
type to describe the prosemirror commands which are
still used in the codebase. - Rename
KeyboardBindings
toKeyBindings
. AllowCommandFunctionParams
to provide extra parameters like
next
in the newly namedKeyBindings
. - Create a new
KeyBindingCommandFunction
to describe theExtension.keys()
return type. Update the name
of theExcludeOptions.keymaps
->ExcludeOptions.keys
.
BREAKING CHANGE
- Create a new exported
-
24f8341: Improve the way
ExtensionManager
callsExtension.keys
methods. Keys now use the new api for
CommandFunctions which provides anext
method. This method allows for better control when deciding whether
or not to defer to the next keybinding in the chain.To override, create a new keybinding with another extension. Make sure the extension is created with a
higher priority. The keybinding you create can either return true or false. By default if it returns true,
no other keybindings will run. However if it returnsfalse
all other keybindings will be run until one
returnstrue
next
basically calls the every lower priority keybinding in the extensions list. It gives you full control
of how the bindings are called.
Patch Changes
- Updated dependencies [24f8341]
- @remirror/core-types@0.8.0
- @remirror/core-helpers@0.7.5
- @remirror/core-utils@0.7.5
- prosemirror-suggest@0.7.5