rename demo, add more content
This commit is contained in:
36
docs/src/demos/Api/Schema/GenerateHTML/index.vue
Normal file
36
docs/src/demos/Api/Schema/GenerateHTML/index.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<pre>{{ html }}</pre>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { generateHTML } from '@tiptap/html'
|
||||
import Document from '@tiptap/extension-document'
|
||||
import Paragraph from '@tiptap/extension-paragraph'
|
||||
import Text from '@tiptap/extension-text'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
json: {
|
||||
type: 'document',
|
||||
content: [{
|
||||
type: 'paragraph',
|
||||
content: [{
|
||||
type: 'text',
|
||||
text: 'Example Text',
|
||||
}],
|
||||
}],
|
||||
},
|
||||
html: '',
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.html = generateHTML(this.json, [
|
||||
Document(),
|
||||
Paragraph(),
|
||||
Text(),
|
||||
])
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user