rename ordererdlist command

This commit is contained in:
Philipp Kühn
2020-11-18 11:34:44 +01:00
parent 6ca1a6c307
commit d1c767413e
6 changed files with 7 additions and 7 deletions

View File

@@ -43,7 +43,7 @@
<button @click="editor.chain().focus().toggleBulletList().run()" :class="{ 'is-active': editor.isActive('bulletList') }"> <button @click="editor.chain().focus().toggleBulletList().run()" :class="{ 'is-active': editor.isActive('bulletList') }">
bullet list bullet list
</button> </button>
<button @click="editor.chain().focus().orderedList().run()" :class="{ 'is-active': editor.isActive('orderedList') }"> <button @click="editor.chain().focus().toggleOrderedList().run()" :class="{ 'is-active': editor.isActive('orderedList') }">
ordered list ordered list
</button> </button>
<button @click="editor.chain().focus().codeBlock().run()" :class="{ 'is-active': editor.isActive('codeBlock') }"> <button @click="editor.chain().focus().codeBlock().run()" :class="{ 'is-active': editor.isActive('codeBlock') }">

View File

@@ -43,7 +43,7 @@
<button @click="editor.chain().focus().toggleBulletList().run()" :class="{ 'is-active': editor.isActive('bulletList') }"> <button @click="editor.chain().focus().toggleBulletList().run()" :class="{ 'is-active': editor.isActive('bulletList') }">
bullet list bullet list
</button> </button>
<button @click="editor.chain().focus().orderedList().run()" :class="{ 'is-active': editor.isActive('orderedList') }"> <button @click="editor.chain().focus().toggleOrderedList().run()" :class="{ 'is-active': editor.isActive('orderedList') }">
ordered list ordered list
</button> </button>
<button @click="editor.chain().focus().codeBlock().run()" :class="{ 'is-active': editor.isActive('codeBlock') }"> <button @click="editor.chain().focus().codeBlock().run()" :class="{ 'is-active': editor.isActive('codeBlock') }">

View File

@@ -43,7 +43,7 @@
<button @click="editor.chain().focus().toggleBulletList().run()" :class="{ 'is-active': editor.isActive('bulletList') }"> <button @click="editor.chain().focus().toggleBulletList().run()" :class="{ 'is-active': editor.isActive('bulletList') }">
bullet list bullet list
</button> </button>
<button @click="editor.chain().focus().orderedList().run()" :class="{ 'is-active': editor.isActive('orderedList') }"> <button @click="editor.chain().focus().toggleOrderedList().run()" :class="{ 'is-active': editor.isActive('orderedList') }">
ordered list ordered list
</button> </button>
<button @click="editor.chain().focus().codeBlock().run()" :class="{ 'is-active': editor.isActive('codeBlock') }"> <button @click="editor.chain().focus().codeBlock().run()" :class="{ 'is-active': editor.isActive('codeBlock') }">

View File

@@ -3,7 +3,7 @@
<button @click="editor.chain().focus().toggleBulletList().run()" :class="{ 'is-active': editor.isActive('bulletList') }"> <button @click="editor.chain().focus().toggleBulletList().run()" :class="{ 'is-active': editor.isActive('bulletList') }">
bullet list bullet list
</button> </button>
<button @click="editor.chain().focus().orderedList().run()" :class="{ 'is-active': editor.isActive('orderedList') }"> <button @click="editor.chain().focus().toggleOrderedList().run()" :class="{ 'is-active': editor.isActive('orderedList') }">
ordered list ordered list
</button> </button>

View File

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

View File

@@ -54,7 +54,7 @@ const OrderedList = Node.create({
/** /**
* Toggle an ordered list * Toggle an ordered list
*/ */
orderedList: (): Command => ({ commands }) => { toggleOrderedList: (): Command => ({ commands }) => {
return commands.toggleList('orderedList', 'listItem') return commands.toggleList('orderedList', 'listItem')
}, },
} }
@@ -62,7 +62,7 @@ const OrderedList = Node.create({
addKeyboardShortcuts() { addKeyboardShortcuts() {
return { return {
'Shift-Control-9': () => this.editor.commands.orderedList(), 'Shift-Control-9': () => this.editor.commands.toggleOrderedList(),
} }
}, },