@atlaskit/editor-plugin-text-color
Version:
Text color plugin for @atlaskit/editor-core
12 lines • 438 B
JavaScript
import { keymap } from '@atlaskit/editor-common/keymap';
import { bindKeymapWithEditorCommand, toggleHighlightPalette } from '@atlaskit/editor-common/keymaps';
import { togglePalette } from '../editor-commands/palette';
export function keymapPlugin({
api
}) {
const list = {};
if (toggleHighlightPalette.common) {
bindKeymapWithEditorCommand(toggleHighlightPalette.common, togglePalette(api), list);
}
return keymap(list);
}