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

@@ -121,7 +121,7 @@ Thats what the `generateHTML()` is for. Its a helper function which render
By the way, the other way is possible, too. The below examples shows how to generate JSON from HTML.
<demo name="Guide/Content/GenerateJSON" highlight="6,17-23"/>
<demo name="Guide/Content/GenerateJSON" highlight="6-7,18-24"/>
## Migration
If youre migrating existing content to tiptap we would recommend to get your existing output to HTML. Thats probably the best format to get your initial content into tiptap, because ProseMirror ensures there is nothing wrong with it. Even if there are some tags or attributes that arent allowed (based on your configuration), tiptap just throws them away quietly.