1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-01-19 06:18:16 +01:00

docs: replace change with editor (#2433)

Just in a couple places.
This commit is contained in:
Eric Edem 2018-12-02 13:12:41 -08:00 committed by Ian Storm Taylor
parent b1ff42b534
commit b8420fce3f

View File

@ -563,7 +563,7 @@ Move backward one step in the history.
`snapshotSelection() => Editor`
Snapshot `value.selection` for `undo` purposes, useful with delete operations like `change.removeNodeByKey(focusBlock.key).undo()`.
Snapshot `value.selection` for `undo` purposes, useful with delete operations like `editor.removeNodeByKey(focusBlock.key).undo()`.
## Miscellaneous Commands
@ -598,8 +598,8 @@ editor.withoutNormalizing(() => {
By default all new operations are saved to the editor's history. If you have changes that you don't want to show up in the history when the user presses <kbd>cmd+z</kbd>, you can use `withoutSaving` to skip those changes.
```js
change.withoutSaving(() => {
change.setDecorations(decorations)
editor.withoutSaving(() => {
editor.setDecorations(decorations)
})
```