Skip to content

BlockSuite API Documentation / @blocksuite/store / Block

Class: Block

Constructors

new Block()

new Block(schema, yBlock, doc?, options?): Block

Parameters

schema: Schema

yBlock: YBlock

doc?: Doc

options?: BlockOptions = {}

Returns

Block

Defined in

packages/framework/store/src/store/doc/block/index.ts:39

Properties

blockViewType

blockViewType: BlockViewType = BlockViewType.Display

Defined in

packages/framework/store/src/store/doc/block/index.ts:13


doc?

readonly optional doc: Doc

Defined in

packages/framework/store/src/store/doc/block/index.ts:42


options

readonly options: BlockOptions = {}

Defined in

packages/framework/store/src/store/doc/block/index.ts:43


schema

readonly schema: Schema

Defined in

packages/framework/store/src/store/doc/block/index.ts:40


yBlock

readonly yBlock: YBlock

Defined in

packages/framework/store/src/store/doc/block/index.ts:41

Accessors

flavour

get flavour(): string

Returns

string

Defined in

packages/framework/store/src/store/doc/block/index.ts:15


id

get id(): string

Returns

string

Defined in

packages/framework/store/src/store/doc/block/index.ts:19


model

get model(): BlockModel<object, SignaledProps<object>>

Returns

BlockModel<object, SignaledProps<object>>

Defined in

packages/framework/store/src/store/doc/block/index.ts:23


pop

get pop(): (prop) => void

Returns

Function

Parameters

prop: string

Returns

void

Defined in

packages/framework/store/src/store/doc/block/index.ts:27


stash

get stash(): (prop) => void

Returns

Function

Parameters

prop: string

Returns

void

Defined in

packages/framework/store/src/store/doc/block/index.ts:31


version

get version(): number

Returns

number

Defined in

packages/framework/store/src/store/doc/block/index.ts:35