BlockSuite API Documentation / @blocksuite/store / BlockCollection
Class: BlockCollection
Constructors
new BlockCollection()
new BlockCollection(
__namedParameters
):BlockCollection
Parameters
• __namedParameters: DocOptions
Returns
Defined in
packages/framework/store/src/store/doc/block-collection.ts:129
Properties
_yBlocks
protected
readonly
_yBlocks:YMap
<YBlock
>
Defined in
packages/framework/store/src/store/doc/block-collection.ts:101
_ySpaceDoc
protected
readonly
_ySpaceDoc:Doc
Internal
Used for convenient access to the underlying Yjs map, can be used interchangeably with ySpace
Defined in
packages/framework/store/src/store/doc/block-collection.ts:107
awarenessStore
readonly
awarenessStore:AwarenessStore
<BlockSuiteFlags
>
Defined in
packages/framework/store/src/store/doc/block-collection.ts:109
id
readonly
id:string
Defined in
packages/framework/store/src/store/doc/block-collection.ts:111
rootDoc
readonly
rootDoc:BlockSuiteDoc
Defined in
packages/framework/store/src/store/doc/block-collection.ts:113
slots
readonly
slots:object
historyUpdated
historyUpdated:
Slot
<void
>
yBlockUpdated
yBlockUpdated:
Slot
<object
|object
>
Defined in
packages/framework/store/src/store/doc/block-collection.ts:115
Accessors
Text
get
Text(): typeofText
Returns
typeof Text
Defined in
packages/framework/store/src/store/doc/block-collection.ts:338
awarenessSync
get
awarenessSync():AwarenessEngine
Returns
AwarenessEngine
Defined in
packages/framework/store/src/store/doc/block-collection.ts:343
blobSync
get
blobSync():BlobEngine
Returns
BlobEngine
Defined in
packages/framework/store/src/store/doc/block-collection.ts:347
canRedo
get
canRedo():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:351
canUndo
get
canUndo():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:358
collection
get
collection():DocCollection
Returns
Defined in
packages/framework/store/src/store/doc/block-collection.ts:365
crud
get
crud():DocCRUD
Returns
DocCRUD
Defined in
packages/framework/store/src/store/doc/block-collection.ts:369
docSync
get
docSync():DocEngine
Returns
DocEngine
Defined in
packages/framework/store/src/store/doc/block-collection.ts:373
history
get
history():UndoManager
Returns
UndoManager
Defined in
packages/framework/store/src/store/doc/block-collection.ts:377
isEmpty
get
isEmpty():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:381
loaded
get
loaded():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:385
meta
get
meta():undefined
|DocMeta
Returns
undefined
| DocMeta
Defined in
packages/framework/store/src/store/doc/block-collection.ts:389
readonly
get
readonly():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:393
ready
get
ready():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:397
schema
get
schema():Schema
Returns
Defined in
packages/framework/store/src/store/doc/block-collection.ts:401
spaceDoc
get
spaceDoc():Doc
Returns
Doc
Defined in
packages/framework/store/src/store/doc/block-collection.ts:405
yBlocks
get
yBlocks():YMap
<YBlock
>
Returns
YMap
<YBlock
>
Defined in
packages/framework/store/src/store/doc/block-collection.ts:409
Methods
captureSync()
captureSync():
void
Capture current operations to undo stack synchronously.
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:208
clear()
clear():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:212
clearQuery()
clearQuery(
query
,readonly
?):void
Parameters
• query: Query
• readonly?: boolean
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:216
destroy()
destroy():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:222
dispose()
dispose():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:228
generateBlockId()
generateBlockId():
string
Returns
string
Defined in
packages/framework/store/src/store/doc/block-collection.ts:237
getDoc()
getDoc(
__namedParameters
):Doc
Parameters
• __namedParameters: GetDocOptions
= {}
Returns
Defined in
packages/framework/store/src/store/doc/block-collection.ts:241
load()
load(
initFn
?):this
Parameters
• initFn?
Returns
this
Defined in
packages/framework/store/src/store/doc/block-collection.ts:263
redo()
redo():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:287
remove()
remove():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:295
resetHistory()
resetHistory():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:300
transact()
transact(
fn
,shouldTransact
):void
If shouldTransact
is false
, the transaction will not be push to the history stack.
Parameters
• fn
• shouldTransact: boolean
= ...
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:307
undo()
undo():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:324
withoutTransact()
withoutTransact(
callback
):void
Parameters
• callback
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:332