fix bullet list

This commit is contained in:
Philipp Kühn
2020-09-22 20:39:24 +02:00
parent 2856900c6a
commit 2c9973af8c
6 changed files with 77 additions and 28 deletions

View File

@@ -19,11 +19,11 @@ export default new Node()
],
toDOM: () => ['ul', 0],
}))
// .commands(({ editor, type }) => ({
// bulletList: () => ({ commands }) => {
// return commands.toggleList(type, editor.schema.nodes.list_item)
// },
// }))
.commands(({ name }) => ({
bulletList: () => ({ commands }) => {
return commands.toggleList(name, 'list_item')
},
}))
.keys(({ editor }) => ({
'Shift-Ctrl-8': () => editor.bulletList(),
}))