1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-01-18 05:59:13 +01:00

docs: Specify the meaning of the mode option on Editor.nodes

This commit is contained in:
Sunny Hirai 2021-04-06 18:19:16 -07:00
parent 1a4c67f5fa
commit a1b8291a0a

View File

@ -116,6 +116,12 @@ Options: `depth?: number, edge?: 'start' | 'end'`
Iterate through all of the nodes in the Editor.
The `mode` specifies:
- `all` (default): all matching nodes
- `highest`: in a hierarchy of nodes, only return the highest level matching nodes
- `lowest`: in a hierarchy of nodes, only return the lowest level matching nodes
Options: `{at?: Location | Span, match?: NodeMatch, mode?: 'all' | 'highest' | 'lowest', universal?: boolean, reverse?: boolean, voids?: boolean}`
#### `Editor.parent(editor: Editor, at: Location, options?): NodeEntry<Ancestor>`