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 Highlight from '@tiptap/extension-highlight'
import './styles.scss'
export default () => {
const editor = useEditor({
extensions: [Document, Paragraph, Text, Highlight.configure({ multicolor: true })],
content: `
This isn’t highlighted.
But that one is.
And this is highlighted too, but in a different color.
And this one has a data attribute.
`,
})
if (!editor) {
return null
}
return (
<>
>
)
}