Skip to content

API > @blocksuite/blocks > getSelectedContentBlockElements

Function: getSelectedContentBlockElements ​

getSelectedContentBlockElements(root, types): BlockElement[]

use getSelectedBlockElementsByRange with "flat" mode when in text selection

Parameters ​

ParameterType
rootBlockSuiteRoot
types("image" | "text" | "block")[]

Returns ​

BlockElement[]

Defined In ​

packages/blocks/src/page-block/utils/selection.ts:23