use custom splitblock command for text align

This commit is contained in:
Philipp Kühn
2020-10-27 12:37:20 +01:00
parent 2c150f5192
commit 8d0c67cc66
4 changed files with 82 additions and 68 deletions

View File

@@ -43,6 +43,14 @@ const TextAlign = createExtension({
},
}
},
addKeyboardShortcuts() {
return {
// TODO: use custom splitBlock only for `this.options.types`
// TODO: use complete default enter handler (chainCommand) with custom splitBlock
Enter: () => this.editor.splitBlock(true),
}
},
})
export default TextAlign