BlockSuite API Documentation / @blocksuite/blocks / TemplateJob
Class: TemplateJob
Constructors
new TemplateJob()
new TemplateJob(
__namedParameters
):TemplateJob
Parameters
__namedParameters
TemplateJobConfig
Returns
Defined in
packages/blocks/src/root-block/edgeless/services/template.ts:90
Properties
job
job:
Job
Defined in
packages/blocks/src/root-block/edgeless/services/template.ts:73
model
model:
SurfaceBlockModel
Defined in
packages/blocks/src/root-block/edgeless/services/template.ts:75
slots
slots:
object
beforeInsert
beforeInsert:
Slot
<SlotBlockPayload
| {bound
:null
|Bound
;template
:DocSnapshot
;type
:"template"
; }>
Defined in
packages/blocks/src/root-block/edgeless/services/template.ts:77
type
type:
"template"
|"sticker"
Defined in
packages/blocks/src/root-block/edgeless/services/template.ts:88
middlewares
static
middlewares: (job
) =>void
[] =[]
Parameters
job
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/services/template.ts:69
Methods
insertTemplate()
insertTemplate(
template
):Promise
<null
|Bound
>
Parameters
template
unknown
Returns
Promise
<null
| Bound
>
Defined in
packages/blocks/src/root-block/edgeless/services/template.ts:334
walk()
walk(
callback
):void
Parameters
callback
(block
, template
) => void
Returns
void
Defined in
packages/blocks/src/root-block/edgeless/services/template.ts:356
create()
static
create(options
):TemplateJob
Parameters
options
middlewares
(job
) => void
[]
model
type
string
Returns
Defined in
packages/blocks/src/root-block/edgeless/services/template.ts:101