add a few basics

This commit is contained in:
Hans Pagel
2020-08-11 17:26:10 +02:00
parent 8d0a734bf4
commit 4ed6646294
8 changed files with 151 additions and 36 deletions

View File

@@ -0,0 +1,33 @@
<template>
<editor-content :editor="editor" />
</template>
<script>
import { Editor } from '@tiptap/core'
import { EditorContent, Renderer } from '@tiptap/vue'
import extensions from '@tiptap/starter-kit'
export default {
components: {
EditorContent,
},
data() {
return {
editor: null,
}
},
mounted() {
this.editor = new Editor({
content: '<p>Im running tiptap with Vue.js. This demo is interactive, try to edit the text.</p>',
extensions: extensions(),
renderer: Renderer,
})
},
beforeDestroy() {
this.editor.destroy()
},
}
</script>