mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-19 22:27:52 +08:00
25 lines
476 B
JavaScript
25 lines
476 B
JavaScript
import { generateHTML } from '@tiptap/html'
|
|
|
|
import Document from '@tiptap/extension-document'
|
|
import Paragraph from '@tiptap/extension-paragraph'
|
|
import Text from '@tiptap/extension-text'
|
|
|
|
// eslint-disable-next-line
|
|
const html = generateHTML({
|
|
type: 'doc',
|
|
content: [{
|
|
type: 'paragraph',
|
|
attrs: {
|
|
align: 'left',
|
|
},
|
|
content: [{
|
|
type: 'text',
|
|
text: 'Example Text',
|
|
}],
|
|
}],
|
|
}, [
|
|
new Document(),
|
|
new Paragraph(),
|
|
new Text(),
|
|
])
|