add hostic-dom
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
<template>
|
||||
<pre>{{ html }}</pre>
|
||||
<div>
|
||||
<pre>{{ html }}</pre>
|
||||
<pre>{{ otherHtml }}</pre>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { generateHtml } from '@tiptap/core'
|
||||
import { generateHtml as generateHtmlWithoutEditor } from '@tiptap/html'
|
||||
import Document from '@tiptap/extension-document'
|
||||
import Paragraph from '@tiptap/extension-paragraph'
|
||||
import Text from '@tiptap/extension-text'
|
||||
@@ -22,6 +26,7 @@ export default {
|
||||
}],
|
||||
},
|
||||
html: '',
|
||||
otherHtml: '',
|
||||
}
|
||||
},
|
||||
|
||||
@@ -31,6 +36,12 @@ export default {
|
||||
Paragraph(),
|
||||
Text(),
|
||||
])
|
||||
|
||||
this.otherHtml = generateHtmlWithoutEditor(this.json, [
|
||||
Document(),
|
||||
Paragraph(),
|
||||
Text(),
|
||||
])
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user