add a generateJSON utility to the HTML package
This commit is contained in:
@@ -2,14 +2,15 @@
|
||||
[](https://www.npmjs.com/package/@tiptap/html)
|
||||
[](https://npmcharts.com/compare/@tiptap/html?minimal=true)
|
||||
|
||||
The utility helps rendering JSON content as HTML without an editor instance, for example on the server side. All it needs is a JSON and an array of extensions.
|
||||
The utility helps rendering JSON content as HTML, and generating JSON from HTML, without an editor instance, for example on the server side.
|
||||
|
||||
All it needs is JSON or a HTML string, and a list of extensions.
|
||||
|
||||
## Source code
|
||||
[packages/html/](https://github.com/ueberdosis/tiptap/blob/main/packages/html/)
|
||||
|
||||
## Usage
|
||||
## Generate HTML from JSON
|
||||
<demo name="Guide/Content/GenerateHTML" highlight="6-7,42-48"/>
|
||||
|
||||
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"/>
|
||||
## Generate JSON from HTML
|
||||
<demo name="Guide/Content/GenerateJSON" highlight="6-7,18-24"/>
|
||||
|
||||
Reference in New Issue
Block a user