Skip to content

API > @blocksuite/block-std > BlockSelection

Class: BlockSelection ​

Extends ​

Constructors ​

constructor ​

new BlockSelection(__namedParameters): BlockSelection

Parameters ​

ParameterType
__namedParametersBaseSelectionOptions

Returns ​

BlockSelection

Inherited from ​

BaseSelection.constructor

Defined In ​

block-std/src/selection/base.ts:18

Properties ​

path ​

readonly path: string[]

Defined In ​

block-std/src/selection/base.ts:16

Inherited from ​

BaseSelection.path


group ​

static group: string = 'note'

Defined In ​

block-std/src/selection/variants/block.ts:12

Overrides ​

BaseSelection.group


type ​

static type: string = 'block'

Defined In ​

block-std/src/selection/variants/block.ts:11

Overrides ​

BaseSelection.type

Accessors ​

blockId ​

get blockId(): string

Defined In ​

block-std/src/selection/base.ts:22

Inherited from ​

BaseSelection.blockId


group ​

get group(): string

Defined In ​

block-std/src/selection/base.ts:37

Inherited from ​

BaseSelection.group


type ​

get type(): keyof Selection

Defined In ​

block-std/src/selection/base.ts:32

Inherited from ​

BaseSelection.type

Methods ​

equals ​

equals(other): boolean

Parameters ​

ParameterType
otherBaseSelection

Returns ​

boolean

Overrides ​

BaseSelection.equals

Defined In ​

block-std/src/selection/variants/block.ts:14


is ​

is<T>(type): this is SelectionInstance[T]

Type parameters ​

Parameter
T extends keyof Selection

Parameters ​

ParameterType
typeT

Returns ​

this is SelectionInstance[T]

Inherited from ​

BaseSelection.is

Defined In ​

block-std/src/selection/base.ts:26


toJSON ​

toJSON(): Record< string, unknown >

Returns ​

Record< string, unknown >

Overrides ​

BaseSelection.toJSON

Defined In ​

block-std/src/selection/variants/block.ts:21


fromJSON ​

static fromJSON(json): BlockSelection

Parameters ​

ParameterType
jsonRecord< string, unknown >

Returns ​

BlockSelection

Overrides ​

BaseSelection.fromJSON

Defined In ​

block-std/src/selection/variants/block.ts:28