Releases: udecode/plate
Releases · udecode/plate
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
Major Changes
-
- Removed
useDndBlock,useDragBlock, anduseDropBlockhooks in favor ofuseDndNode,useDragNode, anduseDropNode. - Removed
DndProvideranduseDraggableStore. Drop line state is now managed byDndPluginas a single state objectdropTargetcontaining bothidandline. useDropNode: removedonChangeDropLineanddropLineoptions
Migration steps:
- Remove
DndProviderfrom your draggable component (e.g.draggable.tsx) - Replace
useDraggableStorewithuseEditorPlugin(DndPlugin).useOption
- Removed
Minor Changes
- #3861 by @zbeyens –
useDndNodenow supports horizontal orientation. New option isorientation?: 'horizontal' | 'vertical'. Default isvertical.useDraggableState,useDndNode: addcanDropNodecallback option to query if a dragged node can be dropped onto a hovered node.useDropLine:- Added
idoption to show dropline only for hovered element. Default isuseElement().id. - Added
orientationoption to filter droplines by orientation ('horizontal' | 'vertical'). Default isvertical. - Returns empty dropline if orientation doesn't match (e.g., horizontal dropline in vertical orientation)
- Returns empty dropline if elementId doesn't match current hovered element
- Added
Patch Changes
- #3830 by @felixfeng33 – Replace
findNodePathwithfindPath
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
@udecode/[email protected]
Minor Changes
-
#3830 by @felixfeng33 – ## @udecode/[email protected]
Minor Changes
- #3744 by @zbeyens –
- Add
PlateStatic,SlateElement,SlateLeafcomponents for static rendering and server-side HTML serialization - Add
serializeHtmlfunction to serialize editor content to HTML. Deprecating@udecode/plate-htmlin favor of core serialization. - Move from
PlatePlugin(/react) toBasePlugin(/):node.component,render.aboveEditable,render.aboveSlate,render.node - Add to
SlatePlugin:node.props,render.aboveNodes,render.belowNodes,render.afterEditable,render.beforeEditable,render.node
- Add
- #3744 by @zbeyens –