Skip to content

BlockSuite API Documentation / @blocksuite/blocks / TemplateJob

Class: TemplateJob

Constructors

new TemplateJob()

new TemplateJob(__namedParameters): TemplateJob

Parameters

__namedParameters

TemplateJobConfig

Returns

TemplateJob

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

TemplateJob

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

SurfaceBlockModel

type

string

Returns

TemplateJob

Defined in

packages/blocks/src/root-block/edgeless/services/template.ts:101