Skip to content

API > @blocksuite/blocks > getBlockElementsExcludeSubtrees

Function: getBlockElementsExcludeSubtrees ​

getBlockElementsExcludeSubtrees(elements): Element[]

Returns block elements excluding their subtrees. Only keep block elements of same level.

Parameters ​

ParameterType
elementsBlockComponentElement[] | Element[]

Returns ​

Element[]

Defined In ​

packages/blocks/src/_common/utils/query.ts:657