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

This commit is contained in:
Hans Pagel 2020-11-12 16:00:31 +01:00
commit eb827d774b
3 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<template>
<div>
<full-editor v-model="content" />
<full-editor v-model="content" :extensions="extensions" />
<div>
{{ content }}
</div>
@ -9,6 +9,7 @@
<script>
import { FullEditor } from '@tiptap/vue'
import { defaultExtensions } from '@tiptap/starter-kit'
export default {
components: {
@ -17,6 +18,7 @@ export default {
data() {
return {
extensions: defaultExtensions(),
content: '<p>A Vue.js wrapper component for tiptap to use <code>v-model</code>.</p>',
}
},

View File

@ -15,7 +15,6 @@
"vue": "2.x"
},
"dependencies": {
"prosemirror-view": "^1.16.1",
"@tiptap/starter-kit": "1.x"
"prosemirror-view": "^1.16.1"
}
}

View File

@ -6,7 +6,6 @@
<script>
import { Editor } from '@tiptap/core'
import { defaultExtensions } from '@tiptap/starter-kit'
import EditorContent from './EditorContent.ts'
export default {
@ -19,6 +18,12 @@ export default {
type: [String, Object],
default: '',
},
extensions: {
type: Array,
required: true,
default: () => [],
},
},
data() {
@ -29,7 +34,7 @@ export default {
mounted() {
this.editor = new Editor({
extensions: defaultExtensions(),
extensions: this.extensions,
content: this.value,
})