Skip to main content

getDOMSelection

function

Returns the selection for the given window, or the global window if null. Will return null if CAN_USE_DOM is false.

function getDOMSelection(targetWindow: null | Window): null | Selection

Import

import { getDOMSelection } from '@modular/sdk/editor';

Notes

returns
a Selection or null