diff --git a/.changeset/good-lizards-fry.md b/.changeset/good-lizards-fry.md new file mode 100644 index 0000000000..8968c64219 --- /dev/null +++ b/.changeset/good-lizards-fry.md @@ -0,0 +1,5 @@ +--- +'@udecode/slate': patch +--- + +Sync slate add `withMerging` diff --git a/packages/slate/src/interfaces/history-editor/withMerging.ts b/packages/slate/src/interfaces/history-editor/withMerging.ts new file mode 100644 index 0000000000..691cd15437 --- /dev/null +++ b/packages/slate/src/interfaces/history-editor/withMerging.ts @@ -0,0 +1,7 @@ +import { HistoryEditor } from 'slate-history'; + +import type { TEditor } from '../editor'; + +/** {@link HistoryEditor.withMerging} */ +export const withMerging = (editor: TEditor, fn: () => void) => + HistoryEditor.withMerging(editor as any, fn);