-
-
Notifications
You must be signed in to change notification settings - Fork 671
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 #3616 from udecode/refactor/selection
BlockMenuPlugin
- Loading branch information
Showing
106 changed files
with
1,473 additions
and
1,376 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,5 @@ | ||
--- | ||
'@udecode/plate-ai': patch | ||
--- | ||
|
||
WIP |
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,7 @@ | ||
--- | ||
'@udecode/plate-floating': patch | ||
--- | ||
|
||
- `getSelectionBoundingClientRect` is now returning the bounding client rect of the editor selection instead of the dom selection. This is more robust for cases like floating toolbar. | ||
- Update floating toolbar position on value change, in addition to selection change. | ||
- Return `clickOutsideRef` from `useFloatingToolbar` so it can be used to close the toolbar when clicking outside of it. Use `ignore-click-outside/toolbar` class to ignore clicks outside of the toolbar. |
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,5 @@ | ||
--- | ||
'@udecode/slate-react': patch | ||
--- | ||
|
||
- Add `setNode` |
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,17 @@ | ||
--- | ||
'@udecode/plate-selection': minor | ||
--- | ||
|
||
- Add `useBlockSelectionNodes`, `useBlockSelectionFragment`, `useBlockSelectionFragmentProp` | ||
- `BlockSelectionPlugin`: | ||
- Make `setSelectedIds` options optional | ||
- Rename option `getSelectedBlocks` -> `getNodes` | ||
- Extend api: `duplicate`, `removeNodes`, `select`, `setNodes`, `setTexts` | ||
- Rename `BlockContextMenuPlugin` to `BlockMenuPlugin` | ||
- `BlockMenuPlugin` options: | ||
- `position` | ||
- `openId` | ||
- `BlockMenuPlugin` api: | ||
- `hide` | ||
- `show` | ||
- `showContextMenu` |
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,9 @@ | ||
--- | ||
'@udecode/plate-core': patch | ||
--- | ||
|
||
`PlateContent`: | ||
|
||
- When `disabled=true`, `readOnly` should be `true` | ||
- Add prop `aria-disabled=true` and `data-readonly=true` when `readOnly=true` | ||
- Add class `slate-editor`, `ignore-click-outside/toolbar` (used by floating toolbar) |
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,7 @@ | ||
--- | ||
'@udecode/plate-utils': patch | ||
--- | ||
|
||
- Update `useMarkToolbarButton().props.onClick`: focus editor after toggle mark | ||
- Add `useSelectionCollapsed`, `useSelectionExpanded`, `useSelectionWithinBlock`, `useSelectionAcrossBlocks` | ||
- Add `useSelectionFragment`, `useSelectionFragmentProp` |
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,7 @@ | ||
--- | ||
'@udecode/slate-utils': patch | ||
--- | ||
|
||
- Add queries `getBlocks`, `getFragmentProp`, `getSelectionFragment` | ||
- Add transforms `duplicateBlocks`, `removeEmptyPreviousBlock`, `selectNodes`, `setBlockAboveNode`, `setBlockNodes` | ||
- Add utils `unwrapStructuralNodes` |
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,5 @@ | ||
--- | ||
'@udecode/plate-link': patch | ||
--- | ||
|
||
Floating patch |
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.