tiptap/demos/src/Examples/CustomParagraph/React/index.jsx
Kento Moriwaki 357f3b609c
Fixing reoccurring issue #3331 and improving related PR #3533 (#3862)
* Add custom paragraph example

* Remove unnecessary queueMicrotask
2023-03-27 15:43:02 +02:00

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} />
)
}