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