import React, { useState } from 'react'
import { defaultExtensions } from '@tiptap/starter-kit'
import { useEditor, Editor } from '@tiptap/react'
import './styles.scss'
// useEditor only works for child components of
const MenuBar = () => {
const editor = useEditor()
return (
<>
>
)
}
export default () => {
const [value, setValue] = useState(`
Hi there,
this is a basic basic example of tiptap. Sure, there are all kind of basic text styles you’d probably expect from a text editor. But wait until you see the lists:
That’s a bullet list with one …
… or two list items.
Isn’t that great? And all of that is editable. But wait, there’s more. Let’s try a code block:
body {
display: none;
}
I know, I know, this is impressive. It’s only the tip of the iceberg though. Give it a try and click a little bit around. Don’t forget to check the other examples too.