1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-19 05:31:56 +02:00

Add HistoryEditor.withNewBatch to docs (#5769)

This commit is contained in:
Ty Mick
2024-11-22 16:01:22 -08:00
committed by GitHub
parent 4bc552f71f
commit 40686c2ebb

View File

@@ -44,6 +44,12 @@ Undo to the previous saved state.
Apply a series of changes inside a synchronous `fn`, These operations will Apply a series of changes inside a synchronous `fn`, These operations will
be merged into the previous history. 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` #### `HistoryEditor.withoutMerging(editor: HistoryEditor, fn: () => void): void`
Apply a series of changes inside a synchronous `fn`, without merging any of Apply a series of changes inside a synchronous `fn`, without merging any of