add editorcontent component

This commit is contained in:
Philipp Kühn
2020-03-08 23:25:48 +01:00
parent a067259da1
commit a580e257f5
5 changed files with 65 additions and 9 deletions

View File

@@ -8,18 +8,22 @@
redo
</button>
</div>
<div ref="editor"></div>
<editor-content :editor="editor" />
</div>
</template>
<script>
import Editor from '@tiptap/core'
import { Editor, EditorContent } from '@tiptap/core'
import Document from '@tiptap/document-extension'
import Paragraph from '@tiptap/paragraph-extension'
import Text from '@tiptap/text-extension'
import History from '@tiptap/history-extension'
export default {
components: {
EditorContent,
},
data() {
return {
editor: null,
@@ -28,7 +32,6 @@ export default {
mounted() {
this.editor = new Editor({
element: this.$refs.editor,
content: '<p>foo</p>',
extensions: [
new Document(),