rename tasklist command

This commit is contained in:
Philipp Kühn 2020-11-18 11:35:28 +01:00
parent d1c767413e
commit 489e064c76
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<template>
<div v-if="editor">
<button @click="editor.chain().focus().taskList().run()" :class="{ 'is-active': editor.isActive('task_list') }">
<button @click="editor.chain().focus().toggleTaskList().run()" :class="{ 'is-active': editor.isActive('task_list') }">
task list
</button>

View File

@ -35,7 +35,7 @@ const TaskList = Node.create({
/**
* Toggle a task list
*/
taskList: (): Command => ({ commands }) => {
toggleTaskList: (): Command => ({ commands }) => {
return commands.toggleList('taskList', 'taskItem')
},
}