diff --git a/templates/plate-playground-template/src/components/plate-editor.tsx b/templates/plate-playground-template/src/components/plate-editor.tsx index dbdc46e416..5c3a99d6bf 100644 --- a/templates/plate-playground-template/src/components/plate-editor.tsx +++ b/templates/plate-playground-template/src/components/plate-editor.tsx @@ -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'; @@ -160,7 +160,12 @@ export default function PlateEditor() { return ( -
+
@@ -225,7 +230,6 @@ export const useCreateEditor = () => { enableMerging: true, }, }), - SelectionOverlayPlugin, TodoListPlugin, TogglePlugin, @@ -432,9 +436,9 @@ export const useCreateEditor = () => { TrailingBlockPlugin.configure({ options: { type: ParagraphPlugin.key }, }), - SelectionOverlayPlugin, // Collaboration + DragOverCursorPlugin, CommentsPlugin.configure({ options: { users: { diff --git a/templates/plate-playground-template/src/components/plate-ui/cursor-overlay.tsx b/templates/plate-playground-template/src/components/plate-ui/cursor-overlay.tsx index 2d2e279bfa..ae873a919a 100644 --- a/templates/plate-playground-template/src/components/plate-ui/cursor-overlay.tsx +++ b/templates/plate-playground-template/src/components/plate-ui/cursor-overlay.tsx @@ -73,7 +73,7 @@ export function CursorOverlay({ cursors, ...props }: CursorOverlayProps) { ); } -const DragOverCursorPlugin = createPlatePlugin({ +export const DragOverCursorPlugin = createPlatePlugin({ key: 'dragOverCursor', options: { cursors: {} as Record> }, handlers: {