Refactor interactivity demos

This commit is contained in:
svenadlung
2021-11-22 20:48:04 +01:00
parent bdb055187a
commit d434675f74
19 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,27 @@
import React from 'react'
import { useEditor, EditorContent } from '@tiptap/react'
import StarterKit from '@tiptap/starter-kit'
import ReactComponent from './Extension.js'
import './styles.scss'
export default () => {
const editor = useEditor({
extensions: [
StarterKit,
ReactComponent,
],
content: `
<p>
This is still the text editor youre used to, but enriched with node views.
</p>
<react-component count="0"></react-component>
<p>
Did you see that? Thats a React component. We are really living in the future.
</p>
`,
})
return (
<EditorContent editor={editor} />
)
}