Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfeng33 committed Nov 1, 2024
1 parent 768893a commit 64df4f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ import { CommentLeaf } from '@/components/plate-ui/comment-leaf';
import { CommentsPopover } from '@/components/plate-ui/comments-popover';
import {
CursorOverlay,
SelectionOverlayPlugin,
DragOverCursorPlugin,
} from '@/components/plate-ui/cursor-overlay';
import { Editor } from '@/components/plate-ui/editor';
import { EmojiInputElement } from '@/components/plate-ui/emoji-input-element';
Expand Down Expand Up @@ -160,7 +160,12 @@ export default function PlateEditor() {
return (
<DndProvider backend={HTML5Backend}>
<Plate editor={editor}>
<div id="scroll_container" ref={containerRef} data-plate-selectable>
<div
className="relative"
id="scroll_container"
ref={containerRef}
data-plate-selectable
>
<FixedToolbar>
<FixedToolbarButtons />
</FixedToolbar>
Expand Down Expand Up @@ -225,7 +230,6 @@ export const useCreateEditor = () => {
enableMerging: true,
},
}),
SelectionOverlayPlugin,

TodoListPlugin,
TogglePlugin,
Expand Down Expand Up @@ -432,9 +436,9 @@ export const useCreateEditor = () => {
TrailingBlockPlugin.configure({
options: { type: ParagraphPlugin.key },
}),
SelectionOverlayPlugin,

// Collaboration
DragOverCursorPlugin,
CommentsPlugin.configure({
options: {
users: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function CursorOverlay({ cursors, ...props }: CursorOverlayProps) {
);
}

const DragOverCursorPlugin = createPlatePlugin({
export const DragOverCursorPlugin = createPlatePlugin({
key: 'dragOverCursor',
options: { cursors: {} as Record<string, CursorState<CursorData>> },
handlers: {
Expand Down

0 comments on commit 64df4f7

Please sign in to comment.