mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-27 09:04:31 +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:
committed by
Ian Storm Taylor
parent
8928363471
commit
1ae4471692
@@ -104,10 +104,11 @@ Insert a new `node` at `path`.
|
|||||||
{
|
{
|
||||||
type: 'merge_node',
|
type: 'merge_node',
|
||||||
path: Array,
|
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`
|
### `move_node`
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user