style: move node text content into helper function

This commit is contained in:
Dominik Biedebach
2022-05-20 17:10:30 +02:00
committed by Dominik
parent 30c39c94c9
commit 0597e474af
4 changed files with 31 additions and 29 deletions

View File

@@ -1,18 +1,17 @@
import React from 'react'
import { useEditor, EditorContent } from '@tiptap/react'
import Document from '@tiptap/extension-document'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import Mention from '@tiptap/extension-mention'
import suggestion from './suggestion'
import './styles.scss'
import React from 'react'
import Mention from '@tiptap/extension-mention'
import { EditorContent, useEditor } from '@tiptap/react'
import StarterKit from '@tiptap/starter-kit'
import suggestion from './suggestion'
export default () => {
const editor = useEditor({
extensions: [
Document,
Paragraph,
Text,
StarterKit,
Mention.configure({
HTMLAttributes: {
class: 'mention',

View File

@@ -6,9 +6,7 @@
<script>
import { Editor, EditorContent } from '@tiptap/vue-3'
import Document from '@tiptap/extension-document'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'
import StarterKit from '@tiptap/starter-kit'
import Mention from '@tiptap/extension-mention'
import suggestion from './suggestion'
@@ -26,9 +24,7 @@ export default {
mounted() {
this.editor = new Editor({
extensions: [
Document,
Paragraph,
Text,
StarterKit,
Mention.configure({
HTMLAttributes: {
class: 'mention',