From 7a3910be073efd56f61d6a9bcc8f5ec3f68ce860 Mon Sep 17 00:00:00 2001 From: Felix Feng Date: Sat, 14 Sep 2024 16:45:47 +0800 Subject: [PATCH 1/2] Add withMerging --- .../slate/src/interfaces/history-editor/withMerging.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 packages/slate/src/interfaces/history-editor/withMerging.ts 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); From 06f5e99c76a75d29c32cc2038426b3a4921af8ba Mon Sep 17 00:00:00 2001 From: Felix Feng Date: Sat, 14 Sep 2024 16:47:36 +0800 Subject: [PATCH 2/2] changeset --- .changeset/good-lizards-fry.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/good-lizards-fry.md 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`