a few minor improvements to the content

This commit is contained in:
Hans Pagel
2020-09-24 15:58:40 +02:00
parent 299ca72f3e
commit 2848b814b6
4 changed files with 18 additions and 33 deletions

View File

@@ -71,3 +71,9 @@ class Text extends Node {
}
}
```
## Difference between a Node and a Mark
*Nodes* are like blocks of content, for example paragraphs, headlines, code blocks, blockquotes and many more.
*Marks* can apply a different style to specific parts of text inside a *Node*. Thats the case for **bold**, *italic* or ~~striked~~ text. [Links](#) are *Marks*, too.

View File

@@ -2,11 +2,13 @@
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.
Thats what `generateHtml()` 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 were working on making this available to Node.js (to use it on the server side).
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).
:::
<demo name="Api/Schema" />
<demo name="Api/Schema/GenerateHtml" highlight="6,29-33"/>
## Converting JSON<>HTML with PHP