fixes #232: Clicking toolbar TodoItem lifts TodoItem
This commit is contained in:
@@ -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 }) {
|
||||||
|
|||||||
Reference in New Issue
Block a user