Skip to content

Commit

Permalink
Add HistoryEditor.withNewBatch to docs (#5769)
Browse files Browse the repository at this point in the history
  • Loading branch information
TyMick authored Nov 23, 2024
1 parent 4bc552f commit 40686c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/libraries/slate-history/history-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ Undo to the previous saved state.
Apply a series of changes inside a synchronous `fn`, These operations will
be merged into the previous history.

#### `HistoryEditor.withNewBatch(editor: HistoryEditor, fn: () => void): void`

Apply a series of changes inside a synchronous `fn`, ensuring that the first
operation starts a new batch in the history. Subsequent operations will be
merged as usual.

#### `HistoryEditor.withoutMerging(editor: HistoryEditor, fn: () => void): void`

Apply a series of changes inside a synchronous `fn`, without merging any of
Expand Down

0 comments on commit 40686c2

Please sign in to comment.