2026-02-17 12:47:39 +05:30
|
|
|
"use client";
|
2026-02-16 16:05:16 +05:30
|
|
|
|
2026-02-20 22:44:56 -08:00
|
|
|
import { DndPlugin } from "@platejs/dnd";
|
2026-02-17 12:47:39 +05:30
|
|
|
import { DndProvider } from "react-dnd";
|
|
|
|
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
2026-02-16 16:05:16 +05:30
|
|
|
|
2026-02-17 12:47:39 +05:30
|
|
|
import { BlockDraggable } from "@/components/ui/block-draggable";
|
2026-02-16 16:05:16 +05:30
|
|
|
|
|
|
|
|
export const DndKit = [
|
2026-02-17 12:47:39 +05:30
|
|
|
DndPlugin.configure({
|
|
|
|
|
options: {
|
|
|
|
|
enableScroller: true,
|
|
|
|
|
},
|
|
|
|
|
render: {
|
|
|
|
|
aboveNodes: BlockDraggable,
|
|
|
|
|
aboveSlate: ({ children }) => <DndProvider backend={HTML5Backend}>{children}</DndProvider>,
|
|
|
|
|
},
|
|
|
|
|
}),
|
2026-02-16 16:05:16 +05:30
|
|
|
];
|