Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeyens committed Nov 11, 2024
1 parent 43d827e commit 195163e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
18 changes: 18 additions & 0 deletions .changeset/core-minor.md
Original file line number Diff line number Diff line change
@@ -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.
14 changes: 0 additions & 14 deletions .changeset/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion .changeset/id.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 } })`
2 changes: 1 addition & 1 deletion .changeset/utils.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 195163e

Please sign in to comment.