docs: update content
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<pre><code>{{ html }}</code></pre>
|
||||
<pre><code>{{ output }}</code></pre>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -7,29 +7,44 @@ import { generateHTML } from '@tiptap/html'
|
||||
import Document from '@tiptap/extension-document'
|
||||
import Paragraph from '@tiptap/extension-paragraph'
|
||||
import Text from '@tiptap/extension-text'
|
||||
import Bold from '@tiptap/extension-bold'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
output: '',
|
||||
json: {
|
||||
type: 'document',
|
||||
content: [{
|
||||
type: 'paragraph',
|
||||
content: [{
|
||||
type: 'text',
|
||||
text: 'Example Text',
|
||||
}],
|
||||
}],
|
||||
content: [
|
||||
{
|
||||
type: 'paragraph',
|
||||
content: [
|
||||
{
|
||||
type: 'text',
|
||||
text: 'Example ',
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
marks: [
|
||||
{
|
||||
type: 'bold',
|
||||
},
|
||||
],
|
||||
text: 'Text',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
html: '',
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.html = generateHTML(this.json, [
|
||||
this.output = generateHTML(this.json, [
|
||||
Document,
|
||||
Paragraph,
|
||||
Text,
|
||||
Bold,
|
||||
])
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user