rename some commands

This commit is contained in:
Philipp Kühn
2020-11-18 16:59:58 +01:00
parent 91297d29fb
commit 1b45acd5d5
10 changed files with 35 additions and 35 deletions

View File

@@ -1,9 +1,9 @@
<template>
<div v-if="editor">
<button @click="addLink" :class="{ 'is-active': editor.isActive('link') }">
<button @click="setLink" :class="{ 'is-active': editor.isActive('link') }">
link
</button>
<button @click="editor.chain().focus().removeLink().run()" v-if="editor.isActive('link')">
<button @click="editor.chain().focus().unsetLink().run()" v-if="editor.isActive('link')">
remove
</button>
<editor-content :editor="editor" />
@@ -49,10 +49,10 @@ export default {
},
methods: {
addLink() {
setLink() {
const url = window.prompt('URL')
this.editor.chain().focus().addLink({ href: url }).run()
this.editor.chain().focus().setLink({ href: url }).run()
},
},