Merge branch 'main' of github.com:ueberdosis/tiptap-next into main

This commit is contained in:
Hans Pagel
2020-11-13 15:47:06 +01:00
4 changed files with 50 additions and 22 deletions

View File

@@ -1,50 +0,0 @@
<template>
<div>
<editor-content :editor="editor" />
</div>
</template>
<script>
import { Editor } from '@tiptap/core'
import EditorContent from './EditorContent.ts'
export default {
components: {
EditorContent,
},
props: {
value: {
type: [String, Object],
default: '',
},
extensions: {
type: Array,
required: true,
default: () => [],
},
},
data() {
return {
editor: null,
}
},
mounted() {
this.editor = new Editor({
extensions: this.extensions,
content: this.value,
})
this.editor.on('update', () => {
this.$emit('input', this.editor.getHTML())
})
},
beforeDestroy() {
this.editor.destroy()
},
}
</script>

View File

@@ -1,4 +1,3 @@
export * from '@tiptap/core'
export { default as VueRenderer } from './VueRenderer'
export { default as EditorContent } from './components/EditorContent'
export { default as FullEditor } from './components/FullEditor.vue'