docs: update content

This commit is contained in:
Hans Pagel
2021-04-08 22:56:09 +02:00
parent f3b91bc27b
commit f4d3bbd5ec
2 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
# clearNodes
The `clearNodes` command normalizes nodes to a simple paragraph, it even normalizes all kind of lists. For advanced use cases it can come in handy, before applying a new node type.
The `clearNodes` command normalizes nodes to the default node, which is the paragraph by default. Itll even normalize all kind of lists. For advanced use cases it can come in handy, before applying a new node type.
If you wonder how you can define the default node: It depends on whats in the `content` attribute of your [`Document`](/api/nodes/document), by default thats `block+` (at least one block node) and the [`Paragraph`](/api/nodes/paragraph) node has the highest priority, so its loaded first and is therefore the default node.
## Usage
```js