mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-24 16:02:55 +02:00
docs: Add API reference for NodeEntry
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
- [Editor](api/nodes/editor.md)
|
||||
- [Element](api/nodes/element.md)
|
||||
- [Node](api/nodes/node.md)
|
||||
- [NodeEntry](api/nodes/node-entry.md)
|
||||
- [Text](api/nodes/text.md)
|
||||
- [Location Types](api/locations/README.md)
|
||||
- [Location](api/locations/location.md)
|
||||
|
@@ -10,6 +10,7 @@ type Ancestor = Editor | Element
|
||||
```
|
||||
|
||||
- [Node](./node.md)
|
||||
- [NodeEntry](./node-entry.md)
|
||||
- [Editor](./editor.md)
|
||||
- [Element](./element.md)
|
||||
- [Text](./text.md)
|
||||
|
9
docs/api/nodes/node-entry.md
Normal file
9
docs/api/nodes/node-entry.md
Normal file
@@ -0,0 +1,9 @@
|
||||
# NodeEntry
|
||||
|
||||
`NodeEntry` objects are returned when iterating over the nodes in a Slate document tree. They consist of the node and its `Path` relative to the root node in the document.
|
||||
|
||||
They are generics meaning that sometimes they will return a subset of `Node` types like an `Element` or `Text`.
|
||||
|
||||
```typescript
|
||||
type NodeEntry<T extends Node = Node> = [T, Path]
|
||||
```
|
Reference in New Issue
Block a user