From f327be30bc5502258672839b08ac28675a8150ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Fri, 24 Apr 2020 10:05:07 +0200 Subject: [PATCH] wording --- docs/src/docPages/schema.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/docPages/schema.md b/docs/src/docPages/schema.md index 0e190b82..5086ca40 100644 --- a/docs/src/docPages/schema.md +++ b/docs/src/docPages/schema.md @@ -29,7 +29,7 @@ The most simple schema for a typical *ProseMirror* editor is looking something l } ``` -We register three nodes here. `document`, `paragraph` and `text`. `document` is the root node which allows multiple block nodes as children (`content: 'block+'`). Since `paragraph` is in the group of block nodes (`group: 'block'`) our document can only contain paragraphs. Our paragraphs allow zero or more inline nodes as children (`content: 'inline*'`) so there can only be `text` in it. `parseDOM` defines how a node can be parsed from pasted HTML. `toDOM` defines how it will be rendered in the DOM. +We register three nodes here. `document`, `paragraph` and `text`. `document` is the root node which allows one or more block nodes as children (`content: 'block+'`). Since `paragraph` is in the group of block nodes (`group: 'block'`) our document can only contain paragraphs. Our paragraphs allow zero or more inline nodes as children (`content: 'inline*'`) so there can only be `text` in it. `parseDOM` defines how a node can be parsed from pasted HTML. `toDOM` defines how it will be rendered in the DOM. In tiptap we define every node in its own `Extension` class instead. This allows us to split logic per node. Under the hood the schema will be merged together.