MCPcopy Create free account
hub / github.com/FormidableLabs/use-editable / getCurrentRange

Function getCurrentRange

src/useEditable.ts:19–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17};
18
19const getCurrentRange = () => window.getSelection()!.getRangeAt(0)!;
20
21const setCurrentRange = (range: Range) => {
22 const selection = window.getSelection()!;

Callers 3

getPositionFunction · 0.85
insertFunction · 0.85
onKeyDownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…