add link button
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<div v-if="editor">
|
||||
<button @click="addLink">
|
||||
link
|
||||
</button>
|
||||
<editor-content :editor="editor" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -39,6 +42,14 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
addLink() {
|
||||
const url = window.prompt('Link:')
|
||||
|
||||
this.editor.link(url)
|
||||
},
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
this.editor.destroy()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user