BlockSuite API Documentation / @blocksuite/blocks / AttachmentBlockModel
Class: AttachmentBlockModel
Extends
Constructors
new AttachmentBlockModel(undefined)
new AttachmentBlockModel():
AttachmentBlockModel
Returns
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:99
Properties
[modelLabel]
[modelLabel]:
AttachmentBlockProps
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:101
caption?
optional
caption:string
Inherited from
selectable<AttachmentBlockProps>( BlockModel ).caption
Source
packages/blocks/src/attachment-block/attachment-model.ts:44
childrenUpdated
childrenUpdated:
Slot
<void
>
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:120
connectable
connectable:
boolean
=true
Inherited from
Source
packages/blocks/src/root-block/edgeless/type.ts:77
created
created:
Slot
<void
>
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:115
deleted
deleted:
Slot
<void
>
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:116
embed
embed:
undefined
|boolean
Whether to show the attachment as an embed view.
Inherited from
selectable<AttachmentBlockProps>( BlockModel ).embed
Source
packages/blocks/src/attachment-block/attachment-model.ts:53
flavour
flavour:
string
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:103
id
id:
string
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:109
index
index:
string
Inherited from
Source
packages/blocks/src/attachment-block/attachment-model.ts:32
keys
keys:
string
[]
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:111
name
name:
string
Inherited from
selectable<AttachmentBlockProps>( BlockModel ).name
Source
packages/blocks/src/attachment-block/attachment-model.ts:38
page
page:
Doc
Deprecated
use doc instead
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:108
pop()
pop: (
prop
) =>void
Parameters
• prop: "type"
| "name"
| "style"
| "rotate"
| "xywh"
| "index"
| "size"
| "caption"
| "embed"
| "sourceId"
Returns
void
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:113
propsUpdated
propsUpdated:
Slot
<object
>
Type declaration
key
key:
string
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:117
role
role:
"root"
|"hub"
|"content"
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:104
rotate
rotate:
number
=0
Inherited from
Source
packages/blocks/src/root-block/edgeless/type.ts:78
size
size:
number
Inherited from
selectable<AttachmentBlockProps>( BlockModel ).size
Source
packages/blocks/src/attachment-block/attachment-model.ts:39
sourceId?
optional
sourceId:string
Inherited from
selectable<AttachmentBlockProps>( BlockModel ).sourceId
Source
packages/blocks/src/attachment-block/attachment-model.ts:49
stash()
stash: (
prop
) =>void
Parameters
• prop: "type"
| "name"
| "style"
| "rotate"
| "xywh"
| "index"
| "size"
| "caption"
| "embed"
| "sourceId"
Returns
void
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:112
style?
optional
style:EmbedCardStyle
Inherited from
selectable<AttachmentBlockProps>( BlockModel ).style
Source
packages/blocks/src/attachment-block/attachment-model.ts:55
text?
optional
text:Text
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:114
type
type:
string
MIME type
Inherited from
selectable<AttachmentBlockProps>( BlockModel ).type
Source
packages/blocks/src/attachment-block/attachment-model.ts:43
version
version:
number
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:102
xywh
xywh:
[${number},${number},${number},${number}]
Inherited from
Source
packages/blocks/src/attachment-block/attachment-model.ts:33
yBlock
yBlock:
YBlock
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:110
Accessors
childMap
get
childMap():Map
<string
,number
>
Returns
Map
<string
, number
>
Source
packages/framework/store/dist/schema/base.d.ts:123
children
get
children():BlockModel
<object
>[]
Returns
BlockModel
<object
>[]
Source
packages/framework/store/dist/schema/base.d.ts:124
doc
get
doc():Doc
set
doc(doc
):void
Parameters
• doc: Doc
Returns
Source
packages/framework/store/dist/schema/base.d.ts:121
elementBound
get
elementBound():Bound
Returns
Source
packages/blocks/src/root-block/edgeless/type.ts:94
externalBound
get
externalBound():null
|Bound
Returns
null
| Bound
Source
packages/blocks/src/root-block/edgeless/type.ts:90
externalXYWH
get
externalXYWH():undefined
|[${number},${number},${number},${number}]
set
externalXYWH(xywh
):void
Parameters
• xywh: undefined
| [${number},${number},${number},${number}]
Returns
undefined
| [${number},${number},${number},${number}]
Source
packages/blocks/src/root-block/edgeless/type.ts:82
group
get
group():null
|GroupLikeModel
<BaseProps
>
Returns
null
| GroupLikeModel
<BaseProps
>
Source
packages/blocks/src/root-block/edgeless/type.ts:156
groups
get
groups():GroupLikeModel
<BaseProps
>[]
Returns
GroupLikeModel
<BaseProps
>[]
Source
packages/blocks/src/root-block/edgeless/type.ts:164
Methods
boxSelect()
boxSelect(
bound
):boolean
Parameters
• bound: Bound
Returns
boolean
Inherited from
Source
packages/blocks/src/root-block/edgeless/type.ts:147
containedByBounds()
containedByBounds(
bounds
):boolean
Parameters
• bounds: Bound
Returns
boolean
Inherited from
EdgelessBlock
.containedByBounds
Source
packages/blocks/src/root-block/edgeless/type.ts:104
dispose()
dispose():
void
Returns
void
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:128
firstChild()
firstChild():
null
|BlockModel
<object
>
Returns
null
| BlockModel
<object
>
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:126
getNearestPoint()
getNearestPoint(
point
):IVec
Parameters
• point: IVec
Returns
IVec
Inherited from
Source
packages/blocks/src/root-block/edgeless/type.ts:116
getRelativePointLocation()
getRelativePointLocation(
relativePoint
):PointLocation
Parameters
• relativePoint: IVec
Returns
PointLocation
Inherited from
EdgelessBlock
.getRelativePointLocation
Source
packages/blocks/src/root-block/edgeless/type.ts:133
hitTest()
hitTest(
x
,y
,_
,__
):boolean
Parameters
• x: number
• y: number
• _: HitTestOptions
• __: EditorHost
Returns
boolean
Inherited from
Source
packages/blocks/src/root-block/edgeless/type.ts:99
intersectWithLine()
intersectWithLine(
start
,end
):null
|PointLocation
[]
Parameters
• start: IVec
• end: IVec
Returns
null
| PointLocation
[]
Inherited from
EdgelessBlock
.intersectWithLine
Source
packages/blocks/src/root-block/edgeless/type.ts:124
isEmpty()
isEmpty():
boolean
Returns
boolean
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:125
lastChild()
lastChild():
null
|BlockModel
<object
>
Returns
null
| BlockModel
<object
>
Inherited from
Source
packages/framework/store/dist/schema/base.d.ts:127