1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-27 00:54:22 +02:00

Document the position field of merge_node (#1440)

`merge_node` has a `position` field, which is exactly what I needed in order to transform some operations. It should be documented.
This commit is contained in:
Justin Weiss
2017-12-02 12:30:05 -08:00
committed by Ian Storm Taylor
parent 8928363471
commit 1ae4471692

View File

@@ -104,10 +104,11 @@ Insert a new `node` at `path`.
{
type: 'merge_node',
path: Array,
position: Number
}
```
Merge the node at `path` with it's previously sibling.
Merge the node at `path` with its previous sibling. The `position` refers to either the index in the child nodes of the previous sibling in the case of [`Block`](./block.md) or [`Inline`](./inline.md) nodes, and the index in the characters of the previous sibling in the case of [`Text`](./text.md) nodes.
### `move_node`