@atlaskit/editor-plugin-annotation
Version:
Annotation plugin for @atlaskit/editor-core
13 lines • 763 B
JavaScript
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
import { addInlineComment, bindKeymapWithCommand } from '@atlaskit/editor-common/keymaps';
import { keymap } from '@atlaskit/editor-prosemirror/keymap';
import { setInlineCommentDraftState } from '../editor-commands';
export function keymapPlugin(api) {
var _api$analytics;
const list = {};
bindKeymapWithCommand(
// Ignored via go/ees005
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
addInlineComment.common, setInlineCommentDraftState(api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions, undefined, api)(true, INPUT_METHOD.SHORTCUT), list);
return keymap(list);
}