add editorcontent component
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user