add a draft state to the sidebar

This commit is contained in:
Hans Pagel
2020-08-31 17:50:13 +02:00
parent f8e907783d
commit ae7c5fa834
7 changed files with 74 additions and 4 deletions

View File

@@ -0,0 +1,30 @@
<template>
<editor-content :editor="editor" />
</template>
<script>
import { Editor, EditorContent, defaultExtensions } from '@tiptap/vue-starter-kit'
export default {
components: {
EditorContent,
},
data() {
return {
editor: null,
}
},
mounted() {
this.editor = new Editor({
content: '<p>Im running tiptap with Vue.js. 🎉</p>',
extensions: defaultExtensions(),
})
},
beforeDestroy() {
this.editor.destroy()
},
}
</script>