# getSelectionRects

**Kind:** Function

**Source:** [`atloria-monorepo/apps/web/src/components/Editor/UserCursors.tsx`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/apps/web/src/components/Editor/UserCursors.tsx#L231)

Utility function to get selection rectangles for highlighting

## Signature

```ts
function getSelectionRects(anchor: number, head: number, container: HTMLElement | null): DOMRect[]
```

## Parameters

| Name | Type |
|---|---|
| `anchor` | `number` |
| `head` | `number` |
| `container` | `HTMLElement | null` |

**Returns:** `DOMRect[]`
