init @tiptap/html package
This commit is contained in:
23
packages/html/example.js
Normal file
23
packages/html/example.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import { generateHtml } from '@tiptap/html'
|
||||
|
||||
import Document from '@tiptap/extension-document'
|
||||
import Paragraph from '@tiptap/extension-paragraph'
|
||||
import Text from '@tiptap/extension-text'
|
||||
|
||||
const html = generateHtml({
|
||||
'type': 'document',
|
||||
'content': [{
|
||||
'type': 'paragraph',
|
||||
'attrs': {
|
||||
'align': 'left'
|
||||
},
|
||||
'content': [{
|
||||
'type': 'text',
|
||||
'text': 'Example Text'
|
||||
}]
|
||||
}]
|
||||
}, [
|
||||
new Document(),
|
||||
new Paragraph(),
|
||||
new Text(),
|
||||
])
|
||||
Reference in New Issue
Block a user