UNPKG

@atlaskit/editor-plugin-selection

Version:

Selection plugin for @atlaskit/editor-core

16 lines (14 loc) 622 B
import { bindKeymapWithCommand, moveLeft, moveRight } from '@atlaskit/editor-common/keymaps'; import { keymap } from '@atlaskit/editor-prosemirror/keymap'; import { arrowLeft, arrowRight } from './commands'; function keymapPlugin() { var list = {}; // Ignored via go/ees005 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion bindKeymapWithCommand(moveRight.common, arrowRight, list); // Ignored via go/ees005 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion bindKeymapWithCommand(moveLeft.common, arrowLeft, list); return keymap(list); } export default keymapPlugin;