From 40686c2ebbf04d50ebd4270a9d0e301ebdcb223b Mon Sep 17 00:00:00 2001 From: Ty Mick <5317080+TyMick@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:01:22 -0800 Subject: [PATCH] Add `HistoryEditor.withNewBatch` to docs (#5769) --- docs/libraries/slate-history/history-editor.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/libraries/slate-history/history-editor.md b/docs/libraries/slate-history/history-editor.md index 304931b9c..597b46441 100644 --- a/docs/libraries/slate-history/history-editor.md +++ b/docs/libraries/slate-history/history-editor.md @@ -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