Kind: Function
Source: atloria-monorepo/apps/web/src/components/Editor/UserCursors.tsx
Convert a character index in the editor's content to screen coordinates for drawing a remote user's cursor.
Signature
tsfunction getPositionFromIndex(index: number, contentEditable: HTMLElement | null, overlayReference: HTMLElement | null): { x: number; y: number; height: number } | null
Parameters
| Name | Type |
|---|---|
index | number |
contentEditable | `HTMLElement |
overlayReference | `HTMLElement |
Returns: { x: number; y: number; height: number } | null
Was this page helpful?