Skip to content

getSelectionRects

reference
1 min readUpdated

Kind: Function

Source: atloria-monorepo/apps/web/src/components/Editor/UserCursors.tsx

Utility function to get selection rectangles for highlighting

Signature

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

Parameters

NameType
anchornumber
headnumber
container`HTMLElement

Returns: DOMRect[]

Was this page helpful?

Download as PDF