From e768dc24c811a43c67a7939e10653361bb65edff Mon Sep 17 00:00:00 2001 From: Chrissi2812 Date: Fri, 3 May 2019 10:31:27 +0200 Subject: [PATCH] fixes #232: Clicking toolbar TodoItem lifts TodoItem --- packages/tiptap-extensions/src/nodes/TodoList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/tiptap-extensions/src/nodes/TodoList.js b/packages/tiptap-extensions/src/nodes/TodoList.js index 73c8c154..d36543a7 100644 --- a/packages/tiptap-extensions/src/nodes/TodoList.js +++ b/packages/tiptap-extensions/src/nodes/TodoList.js @@ -1,5 +1,5 @@ import { Node } from 'tiptap' -import { wrapInList, wrappingInputRule } from 'tiptap-commands' +import { toggleList, wrappingInputRule } from 'tiptap-commands' export default class TodoList extends Node { @@ -19,8 +19,8 @@ export default class TodoList extends Node { } } - commands({ type }) { - return () => wrapInList(type) + commands({ type, schema }) { + return () => toggleList(type, schema.nodes.todo_item) } inputRules({ type }) {