prefix all commands with ‚commands‘

This commit is contained in:
Philipp Kühn
2020-11-13 11:42:04 +01:00
parent c3fa5ebf1b
commit 13489998b9
20 changed files with 54 additions and 82 deletions

View File

@@ -49,8 +49,8 @@ const TaskItem = createNode({
addKeyboardShortcuts() {
const shortcuts = {
Enter: () => this.editor.splitListItem('taskItem'),
'Shift-Tab': () => this.editor.liftListItem('taskItem'),
Enter: () => this.editor.commands.splitListItem('taskItem'),
'Shift-Tab': () => this.editor.commands.liftListItem('taskItem'),
}
if (!this.options.nested) {
@@ -59,7 +59,7 @@ const TaskItem = createNode({
return {
...shortcuts,
Tab: () => this.editor.sinkListItem('taskItem'),
Tab: () => this.editor.commands.sinkListItem('taskItem'),
}
},
@@ -78,7 +78,7 @@ const TaskItem = createNode({
view.dispatch(view.state.tr.setNodeMarkup(getPos(), undefined, {
checked,
}))
editor.focus()
editor.commands.focus()
}
})