Skip to content

Commit c474ae8

Browse files
committed
1 parent 3fa6c56 commit c474ae8

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// src/Tiptap.tsx
2+
import { useEditor, EditorContent } from '@tiptap/react'
3+
import { FloatingMenu, BubbleMenu } from '@tiptap/react/menus'
4+
import StarterKit from '@tiptap/starter-kit'
5+
6+
const Tiptap = () => {
7+
const editor = useEditor({
8+
extensions: [StarterKit], // define your extension array
9+
content: '<p>Hello World!</p>', // initial content
10+
})
11+
12+
return (
13+
<div>
14+
<EditorContent editor={editor} />
15+
<FloatingMenu editor={editor}>This is the floating menu</FloatingMenu>
16+
<BubbleMenu editor={editor}>This is the bubble menu</BubbleMenu>
17+
</div>
18+
)
19+
}
20+
21+
export default Tiptap

0 commit comments

Comments
 (0)