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 Signature

get flavour(): string

Returns

string

Defined in

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


id

Get Signature

get id(): string

Returns

string

Defined in

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


model

Get Signature

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 Signature

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 Signature

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 Signature

get version(): number

Returns

number

Defined in

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