-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2859 from udecode/feat/plate-controller
Implement PlateController
- Loading branch information
Showing
35 changed files
with
1,050 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
"@udecode/plate-core": minor | ||
--- | ||
|
||
- Introduce `PlateController` as a way of accessing the active editor from an ancestor or sibling of `Plate` (see [Accessing the Editor](https://platejs.org/docs/accessing-editor#from-a-sibling-or-ancestor-of-plate)). | ||
- Add `primary` prop to `Plate` (default true) | ||
- Add `isFallback` to `editor` instance (default false) | ||
- The following hooks now throw a runtime error when used outside of either a `Plate` or `PlateController`, and accept a `debugHookName` option to customize this error message: | ||
- `useIncrementVersion` | ||
- `useRedecorate` | ||
- `useReplaceEditor` | ||
- `useEditorMounted` (new) | ||
- `useEditorReadOnly` | ||
- `useEditorRef` | ||
- `useEdtiorSelection` | ||
- `useEditorSelector` | ||
- `useEditorState` | ||
- `useEditorVersion` | ||
- `useSelectionVersion` | ||
- Change the default `id` of a `Plate` editor from `'plate'` to a random value generated with `nanoid/non-secure` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.