fixes #232: Clicking toolbar TodoItem lifts TodoItem

This commit is contained in:
Chrissi2812
2019-05-03 10:31:27 +02:00
parent cf7ff907a1
commit e768dc24c8

View File

@@ -1,5 +1,5 @@
import { Node } from 'tiptap' import { Node } from 'tiptap'
import { wrapInList, wrappingInputRule } from 'tiptap-commands' import { toggleList, wrappingInputRule } from 'tiptap-commands'
export default class TodoList extends Node { export default class TodoList extends Node {
@@ -19,8 +19,8 @@ export default class TodoList extends Node {
} }
} }
commands({ type }) { commands({ type, schema }) {
return () => wrapInList(type) return () => toggleList(type, schema.nodes.todo_item)
} }
inputRules({ type }) { inputRules({ type }) {