This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/app/scenes/Document/components/plugins.js

16 lines
350 B
JavaScript

// @flow
import { Editor } from 'slate';
import isModKey from 'rich-markdown-editor/lib/lib/isModKey';
export default [
{
onKeyDown(ev: SyntheticKeyboardEvent<>, editor: Editor, next: Function) {
if (ev.key === 'p' && ev.shiftKey && isModKey(ev)) {
return editor.props.onPublish(ev);
}
return next();
},
},
];