UNPKG

@atlaskit/editor-plugin-text-color

Version:

Text color plugin for @atlaskit/editor-core

11 lines 389 B
import { bindKeymapWithEditorCommand, keymap, 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); }