All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
16 lines
383 B
JavaScript
16 lines
383 B
JavaScript
import keyDown from './events/keyDown';
|
|
import toggleBlock from './events/toggleBlock';
|
|
|
|
function withBlocks(editor) {
|
|
if (editor.keyDownHandlers === undefined) {
|
|
editor.keyDownHandlers = [];
|
|
}
|
|
editor.keyDownHandlers.push((event, editor) => keyDown(event, editor));
|
|
|
|
editor.toggleBlock = type => toggleBlock(editor, type);
|
|
|
|
return editor;
|
|
}
|
|
|
|
export default withBlocks;
|