Skip to main content
Modular Documentation
Guides
Reference
Reference
/
@modular/sdk/editor
$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';