From 195163e6e3d612c1d016112b982e9d49213efb3d Mon Sep 17 00:00:00 2001 From: zbeyens Date: Mon, 11 Nov 2024 15:59:06 +0100 Subject: [PATCH] docs --- .changeset/core-minor.md | 18 ++++++++++++++++++ .changeset/core.md | 14 -------------- .changeset/id.md | 2 +- .changeset/utils.md | 2 +- 4 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 .changeset/core-minor.md diff --git a/.changeset/core-minor.md b/.changeset/core-minor.md new file mode 100644 index 0000000000..1a31281ec8 --- /dev/null +++ b/.changeset/core-minor.md @@ -0,0 +1,18 @@ +--- +'@udecode/plate-core': minor +--- + +- `Plate` store: add `containerRef`. This is used by some plugins like `CursorOverlay`. +- Add `useEditorContainerRef` selector hook. You can pass the returned ref to your editor scroll container. +- `usePlateEditor` options: `value` can now be a callback function to get the value from the editor +- `editor.key` is now using `nanoid()` +- `editor.uid`: new property added by `Plate` to uniquely identify the editor. The difference with `editor.key` is that `uid` supports SSR hydration. This can be passed to the editor container as `id` prop. +- `render.aboveNodes` and `render.belowNodes` now support `useElement` +- `PlatePlugin.inject` new properties: + - `excludePlugins?: string[]` + - `excludeBelowPlugins?: string[]` + - `maxLevel?: number` + - `isLeaf?: boolean` + - `isBlock?: boolean` + - `isElement?: boolean` +- Add `getInjectMatch(editor, plugin)` to get a plugin inject match function. diff --git a/.changeset/core.md b/.changeset/core.md index 0603b57e1b..e3c7f5fc40 100644 --- a/.changeset/core.md +++ b/.changeset/core.md @@ -2,18 +2,4 @@ '@udecode/plate-core': patch --- -- `Plate` store: add `containerRef`. This is used by some plugins like `CursorOverlay`. -- Add `useEditorContainerRef` selector hook. You can pass the returned ref to your editor scroll container. -- `usePlateEditor` options: `value` can now be a callback function to get the value from the editor -- `editor.key` is now using `nanoid()` -- `editor.uid`: new property added by `Plate` to uniquely identify the editor. The difference with `editor.key` is that `uid` supports SSR hydration. This can be passed to the editor container as `id` prop. - `Plate` now warns if multiple instances of `@udecode/plate-core` are detected. Use `suppressInstanceWarning` to suppress the warning. -- `render.aboveNodes` and `render.belowNodes` now support `useElement` -- `PlatePlugin.inject` new properties: - - `excludePlugins?: string[]` - - `excludeBelowPlugins?: string[]` - - `maxLevel?: number` - - `isLeaf?: boolean` - - `isBlock?: boolean` - - `isElement?: boolean` -- Add `getInjectMatch(editor, plugin)` to get a plugin inject match function. diff --git a/.changeset/id.md b/.changeset/id.md index bbd5cc6534..987d396ab5 100644 --- a/.changeset/id.md +++ b/.changeset/id.md @@ -6,6 +6,6 @@ - New option `filterInline` to filter inline elements. Default is `true`. - `NodeIdPlugin`: - add `normalizeInitialValue` that set node ids when missing, called before mount - - default behavior will normalize only the first and last node if missing id to avoid traversing the entire document + - default behavior will normalize only the first and last node are missing id to avoid traversing the entire document - you can disable it with `NodeIdPlugin.configure({ normalizeInitialValue: null })` - you can force check all nodes with `NodeIdPlugin.configure({ options: { normalizeInitialValue: true } })` diff --git a/.changeset/utils.md b/.changeset/utils.md index da624c177e..55bdd9943a 100644 --- a/.changeset/utils.md +++ b/.changeset/utils.md @@ -1,5 +1,5 @@ --- -'@udecode/plate-utils': patch +'@udecode/plate-utils': minor --- - `PlateElement` add `data-block-id` if `element.id` is defined, after editor mount to support SSR hydration.