mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-11 03:33:12 +08:00
28 lines
522 B
JavaScript
28 lines
522 B
JavaScript
import './styles.scss'
|
|
|
|
import { EditorContent, useEditor } from '@tiptap/react'
|
|
import StarterKit from '@tiptap/starter-kit'
|
|
import React from 'react'
|
|
|
|
import { Paragraph } from './Paragraph.jsx'
|
|
|
|
export default () => {
|
|
const editor = useEditor({
|
|
extensions: [
|
|
StarterKit.configure({
|
|
paragraph: false,
|
|
}),
|
|
Paragraph,
|
|
],
|
|
content: `
|
|
<p>
|
|
Each line shows the number of characters in the paragraph.
|
|
</p>
|
|
`,
|
|
})
|
|
|
|
return (
|
|
<EditorContent editor={editor} />
|
|
)
|
|
}
|