diff --git a/apps/www/content/docs/cursor-overlay.mdx b/apps/www/content/docs/cursor-overlay.mdx index 0679945d72..55d4f26cba 100644 --- a/apps/www/content/docs/cursor-overlay.mdx +++ b/apps/www/content/docs/cursor-overlay.mdx @@ -45,6 +45,21 @@ const plugins = [ ]; ``` +### Editor Container + +The editor requires a container component above `PlateContent` to ensure correct cursor overlay positioning: + +```tsx +export const EditorContainer = (props: React.HTMLAttributes) => { + const editor = useEditorRef(); + const containerRef = useEditorContainerRef(); + + return
; +}; +``` + +This component is available in [Editor](/docs/components/editor). + ### Preserving Selection Focus To maintain the editor's selection state when focusing UI elements, add the `data-plate-focus="true"` attribute to those elements: