rename tasklist command
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-if="editor">
|
<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
|
task list
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const TaskList = Node.create({
|
|||||||
/**
|
/**
|
||||||
* Toggle a task list
|
* Toggle a task list
|
||||||
*/
|
*/
|
||||||
taskList: (): Command => ({ commands }) => {
|
toggleTaskList: (): Command => ({ commands }) => {
|
||||||
return commands.toggleList('taskList', 'taskItem')
|
return commands.toggleList('taskList', 'taskItem')
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user