From e0d7122881c1e8bd5db8bd9b33f6f7dd7226d813 Mon Sep 17 00:00:00 2001 From: Conor Cussell Date: Mon, 2 Oct 2017 20:29:16 +0200 Subject: [PATCH] Document `replaceNodeByKey` (#1200) * Document `replaceNodeByKey` * Update change.md --- docs/reference/slate/change.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/reference/slate/change.md b/docs/reference/slate/change.md index 07947d739..a8c5dda7d 100644 --- a/docs/reference/slate/change.md +++ b/docs/reference/slate/change.md @@ -273,6 +273,11 @@ Remove a `mark` from `length` characters starting at an `offset` in a [`Node`](. Remove a [`Node`](./node.md) from the document by its `key`. +### `replaceNodeByKey` +`replaceNodeByKey(key: String, node: Node) => Change` + +Replace a [`Node`](./node.md) in the document with a new [`Node`](./node.md) by its `key`. + ### `removeTextByKey` `removeTextByKey(key: String, offset: Number, length: Number) => Change`