Skip to main content

$getSelection

function

Returns the current selection of the active editor state, or null if none exists.

function $getSelection(): null | BaseSelection

Import

import { $getSelection } from '@modular/sdk/editor';