Skip to content

BlockSuite API Documentation / @blocksuite/block-std / BlockSelection

Class: BlockSelection

Defined in: packages/framework/block-std/src/selection/variants/block.ts:8

Extends

Constructors

new BlockSelection()

new BlockSelection(__namedParameters): BlockSelection

Defined in: packages/framework/store/dist/extension/selection/base.d.ts:11

Parameters

__namedParameters

BaseSelectionOptions

Returns

BlockSelection

Inherited from

BaseSelection.constructor

Properties

blockId

readonly blockId: string

Defined in: packages/framework/store/dist/extension/selection/base.d.ts:8

Inherited from

BaseSelection.blockId


group

static group: string = 'note'

Defined in: packages/framework/block-std/src/selection/variants/block.ts:9

Overrides

BaseSelection.group


type

static type: string = 'block'

Defined in: packages/framework/block-std/src/selection/variants/block.ts:11

Overrides

BaseSelection.type

Accessors

group

Get Signature

get group(): string

Defined in: packages/framework/store/dist/extension/selection/base.d.ts:9

Returns

string

Inherited from

BaseSelection.group


type

Get Signature

get type(): string

Defined in: packages/framework/store/dist/extension/selection/base.d.ts:10

Returns

string

Inherited from

BaseSelection.type

Methods

equals()

equals(other): boolean

Defined in: packages/framework/block-std/src/selection/variants/block.ts:18

Parameters

other

BaseSelection

Returns

boolean

Overrides

BaseSelection.equals


is()

is<T>(type): this is T extends SelectionConstructor<U> ? U : never

Defined in: packages/framework/store/dist/extension/selection/base.d.ts:14

Type Parameters

T

T extends SelectionConstructor<BaseSelection>

Parameters

type

T

Returns

this is T extends SelectionConstructor<U> ? U : never

Inherited from

BaseSelection.is


toJSON()

toJSON(): Record<string, unknown>

Defined in: packages/framework/block-std/src/selection/variants/block.ts:25

Returns

Record<string, unknown>

Overrides

BaseSelection.toJSON


fromJSON()

static fromJSON(json): BlockSelection

Defined in: packages/framework/block-std/src/selection/variants/block.ts:13

Parameters

json

Record<string, unknown>

Returns

BlockSelection

Overrides

BaseSelection.fromJSON