rename demo, add more content

This commit is contained in:
Hans Pagel
2020-10-28 17:31:51 +01:00
parent 4dad818f7d
commit 83eac2ddd8
2 changed files with 6 additions and 19 deletions

View File

@@ -126,15 +126,13 @@ const schema = getSchema([
## Generate HTML from ProseMirror JSON
If you need to render the content on the server side, e. g. for a blog post that was written with tiptap, youll probably need a way to do just that without an actual editor instance.
If you need to render the content on the server side, for example to render a blog post which was written with tiptap, youll probably need a way to do just that without an actual editor instance. Thats what `generateHTML()` is for. Its a utility function that renders HTML without an actual editor instance.
Thats what `generategetHTML()` is for. Its a utility function that renders HTML without an actual editor instance.
:::warning Work in progress
Currently, that works only in the browser (client side), but we plan to bring this to Node.js (to use it on the server side).
:::info Browser-only rendering
Import a lightweight implementation from `@tiptap/core` if youre using the function in a browser context only.
:::
<demo name="Api/Schema/GenerateHtml" highlight="6,29-33"/>
<demo name="Api/Schema/GenerateHTML" highlight="6,29-33"/>
### Converting JSON<>HTML with PHP