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:15

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:18


options

readonly options: BlockOptions = {}

Defined in

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


schema

readonly schema: Schema

Defined in

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


yBlock

readonly yBlock: YBlock

Defined in

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

Accessors

flavour

get flavour(): string

Returns

string

Defined in

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


id

get id(): string

Returns

string

Defined in

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


model

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

Returns

BlockModel<object, SignaledProps<object>>

Defined in

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


pop

get pop(): (prop) => void

Returns

Function

Parameters

prop: string

Returns

void

Defined in

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


stash

get stash(): (prop) => void

Returns

Function

Parameters

prop: string

Returns

void

Defined in

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


version

get version(): number

Returns

number

Defined in

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