API > @blocksuite/blocks > getSelectedContentBlockElements
Function: getSelectedContentBlockElements ​
getSelectedContentBlockElements(
root,types):BlockElement[]
use getSelectedBlockElementsByRange with "flat" mode when in text selection
Parameters ​
| Parameter | Type |
|---|---|
root | BlockSuiteRoot |
types | ("image" | "text" | "block")[] |
Returns ​
Defined In ​
packages/blocks/src/page-block/utils/selection.ts:23