rename ordererdlist command
This commit is contained in:
@@ -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') }">
|
||||||
|
|||||||
@@ -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') }">
|
||||||
|
|||||||
@@ -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') }">
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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(),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user