import './styles.scss' import { EditorContent, useEditor } from '@tiptap/react' import StarterKit from '@tiptap/starter-kit' import React from 'react' import styles from './index.module.css' const MenuBar = ({ editor }) => { if (!editor) { return null } return (
) } export default () => { const editor = useEditor({ extensions: [ StarterKit, ], content: `

Hi there,

this is a 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:

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.

Wow, that’s amazing. Good work, boy! 👏
— Mom
`, }) return ( <> ) }