add react demo (WIP) to bubble menu

This commit is contained in:
Philipp Kühn
2021-03-30 14:24:52 +02:00
parent daa8e72477
commit 5213069bb4
5 changed files with 34 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
import React from 'react'
import { useEditor, EditorContent } from '@tiptap/react'
import { defaultExtensions } from '@tiptap/starter-kit'
import './styles.scss'
export default () => {
const editor = useEditor({
extensions: [
...defaultExtensions(),
],
content: `
<p>
Hey, try to select some text here. There will popup a menu for selecting some inline styles. Remember: you have full control about content and styling of this menu.
</p>
`,
})
return (
<div>
<EditorContent editor={editor} />
</div>
)
}