From 1ae4471692974a22e374a480e2e02f9d3fa17532 Mon Sep 17 00:00:00 2001 From: Justin Weiss Date: Sat, 2 Dec 2017 12:30:05 -0800 Subject: [PATCH] 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. --- docs/reference/slate/operation.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference/slate/operation.md b/docs/reference/slate/operation.md index 6c0631f17..dbee26f88 100644 --- a/docs/reference/slate/operation.md +++ b/docs/reference/slate/operation.md @@ -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`