From e6c7934cb98baa874d22b5d461f2443ae177c666 Mon Sep 17 00:00:00 2001 From: Jinxuan Zhu Date: Wed, 17 Jan 2018 00:05:29 -0500 Subject: [PATCH] Document: add `change.snapshotSelection` in the change.md (#1534) * docs: add chang.snapshotSelection * Minor style tweaks --- 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 391c95ee1..0c9d3f824 100644 --- a/docs/reference/slate/change.md +++ b/docs/reference/slate/change.md @@ -474,3 +474,8 @@ Move forward one step in the history. `undo() => Change` Move backward one step in the history. + +### `snapshotSelection` +`snapshotSelection() => Change` + +Snapshot `value.selection` for `undo` purposes, useful with delete operations like `removeNodeByKey(focusBlock.key).undo()`