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
Haven't look into details but recently, we had implemented dnd-kit with slate (v103). Here's the working snippet.
<Slateeditor={editor}initialValue={values}onChange={handleEditorChange}><DndContextonDragMove={()=>{setDragMoveCount((prev)=>prev+1)}}onDragStart={handleDragStart}onDragEnd={handleDragEnd}onDragCancel={handleDragCancel}><SortableContextitems={items}strategy={verticalListSortingStrategy}><EditablerenderElement={renderElement}renderLeaf={renderLeaf}placeholder="Enter some rich text…"spellCheckclassName="outline-none"onKeyDown={(event)=>{for(consthotkeyinHOTKEYS){if(isHotkey(hotkey,event)){event.preventDefault()constmark=HOTKEYS[hotkeyaskeyoftypeofHOTKEYS]toggleMark(editor,mark)}}}}/></SortableContext>{createPortal(<DragOverlayadjustScale={false}>{activeElement&&(<DragOverlayContentelement={activeElementasCustomElement}renderLeaf={renderLeaf}HOTKEYS={HOTKEYS}/>)}</DragOverlay>,document.body)}</DndContext></Slate>
Having issue why trying to run dnd kit with slate. It works as of version 78. However it is now version 103. Here is the working codesandbox
https://codesandbox.io/p/sandbox/slate-dnd-kit-styled-7qjxm3?file=%2Fpackage.json
Just update the slate dependencies to the latest and watch it break
The text was updated successfully, but these errors were encountered: