add some more commands

This commit is contained in:
Philipp Kühn
2020-09-21 23:17:30 +02:00
parent 778e064979
commit 4da71ecfbb
27 changed files with 207 additions and 210 deletions

View File

@@ -21,12 +21,12 @@ export default new Node()
],
toDOM: () => ['pre', ['code', 0]],
}))
.commands(({ editor, name }) => ({
[name]: next => attrs => {
editor.toggleNode(name, 'paragraph', attrs)
next()
},
}))
// .commands(({ editor, name }) => ({
// [name]: next => attrs => {
// editor.toggleNode(name, 'paragraph', attrs)
// next()
// },
// }))
.keys(({ editor }) => ({
'Shift-Ctrl-\\': () => editor.codeBlock()
}))