add a generateJSON utility to the HTML package

This commit is contained in:
Hans Pagel
2021-05-05 23:10:45 +02:00
parent 90380f207d
commit a9c0bf5982
10 changed files with 95 additions and 42 deletions

View File

@@ -3,7 +3,10 @@
</template>
<script>
import { generateJSON } from '@tiptap/core'
// Option 1: Browser + server-side
import { generateJSON } from '@tiptap/html'
// Option 2: Browser-only (lightweight)
// import { generateJSON } from '@tiptap/core'
import Document from '@tiptap/extension-document'
import Paragraph from '@tiptap/extension-paragraph'
import Text from '@tiptap/extension-text'