You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`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.
6
+
- Update floating toolbar position on value change, in addition to selection change.
7
+
- 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.
Array of structural types to unwrap from the fragment.
353
+
</APISubListItem>
354
+
</APISubList>
355
+
</APIItem>
356
+
</APIParameters>
357
+
358
+
<APIReturns>
359
+
An array of `TElement` representing the fragment of the current selection. Returns an empty array if the selection is not expanded or if no fragment is found.
360
+
</APIReturns>
361
+
362
+
### useSelectionFragmentProp
363
+
364
+
Returns a prop value derived from the current selection fragment.
Array of structural types to unwrap from the fragment.
422
+
</APISubListItem>
423
+
</APISubList>
424
+
</APIItem>
425
+
</APIParameters>
426
+
427
+
<APIReturns>
428
+
An array of `TElement` representing the fragment of the current selection. Returns an empty array if the selection is not expanded or if no fragment is found.
429
+
</APIReturns>
430
+
359
431
### getSelectionText
360
432
361
433
Gets the selected text from the editor.
@@ -635,6 +707,19 @@ Queries the editor state.
635
707
636
708
## Transforms
637
709
710
+
### duplicateBlocks
711
+
712
+
Duplicates the given blocks and inserts them after the last block in the selection.
713
+
714
+
<APIParameters>
715
+
<APIItemname="editor"type="TEditor">
716
+
The editor instance.
717
+
</APIItem>
718
+
<APIItemname="blocks"type="TNodeEntry[]">
719
+
An array of node entries representing the blocks to duplicate.
720
+
</APIItem>
721
+
</APIParameters>
722
+
638
723
### insertElements
639
724
640
725
Inserts nodes at a location in the document.
@@ -750,6 +835,67 @@ Selects the end point of the block above the selection.
750
835
</APIItem>
751
836
</APIParameters>
752
837
838
+
### selectNodes
839
+
840
+
Selects the range encompassing the given nodes.
841
+
842
+
<APIParameters>
843
+
<APIItemname="editor"type="TEditor">
844
+
The editor instance.
845
+
</APIItem>
846
+
<APIItemname="nodes"type="TNodeEntry[]">
847
+
An array of node entries to select.
848
+
</APIItem>
849
+
</APIParameters>
850
+
851
+
### setBlockAboveNode
852
+
853
+
Sets properties on the block above the current selection.
0 commit comments