Merge branch 'main' of github.com:ueberdosis/tiptap-next into main
This commit is contained in:
@@ -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>
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user