mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 09:16:22 +02:00
feat: add new autoformat and drag-and-drop functionality to the editor, refactor list handling and update dependencies
This commit is contained in:
parent
1450e22f54
commit
93a0487e56
14 changed files with 972 additions and 321 deletions
23
surfsense_web/components/editor/plugins/dnd-kit.tsx
Normal file
23
surfsense_web/components/editor/plugins/dnd-kit.tsx
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
'use client';
|
||||
|
||||
import { DndProvider } from 'react-dnd';
|
||||
import { HTML5Backend } from 'react-dnd-html5-backend';
|
||||
|
||||
import { DndPlugin } from '@platejs/dnd';
|
||||
|
||||
import { BlockDraggable } from '@/components/ui/block-draggable';
|
||||
|
||||
export const DndKit = [
|
||||
DndPlugin.configure({
|
||||
options: {
|
||||
enableScroller: true,
|
||||
},
|
||||
render: {
|
||||
aboveNodes: BlockDraggable,
|
||||
aboveSlate: ({ children }) => (
|
||||
<DndProvider backend={HTML5Backend}>{children}</DndProvider>
|
||||
),
|
||||
},
|
||||
}),
|
||||
];
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue