add hostic-dom

This commit is contained in:
Hans Pagel
2020-10-28 17:12:25 +01:00
parent c353a7f01f
commit 4af6049792
6 changed files with 68 additions and 290 deletions

View File

@@ -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>