Skip to main content

selection

ai-research-agent / editor/rendering/selection

Functions

getSelection()

function getSelection(editor): EditorRange | null

Get the selection range from the current browser selection

Parameters

ParameterType

editor

Editor

Returns

EditorRange | null


setSelection()

function setSelection(editor, range): void

Set the current browser selection to the given selection range

Parameters

ParameterType

editor

Editor

range

null | EditorRange

Returns

void