Skip to content

BlockSuite API Documentation / @blocksuite/blocks / ExportManager

Class: ExportManager

Constructors

new ExportManager()

new ExportManager(std): ExportManager

Parameters

std: BlockStdScope

Returns

ExportManager

Defined in

packages/blocks/src/_common/export-manager/export-manager.ts:122

Properties

std

readonly std: BlockStdScope

Defined in

packages/blocks/src/_common/export-manager/export-manager.ts:122

Accessors

doc

get doc(): Doc

Returns

Doc

Defined in

packages/blocks/src/_common/export-manager/export-manager.ts:114


editorHost

get editorHost(): EditorHost

Returns

EditorHost

Defined in

packages/blocks/src/_common/export-manager/export-manager.ts:118

Methods

edgelessToCanvas()

edgelessToCanvas(surfaceRenderer, bound, edgeless?, nodes?, surfaces?, edgelessBackground?): Promise<undefined | HTMLCanvasElement>

Parameters

surfaceRenderer: CanvasRenderer

bound: IBound

edgeless?: EdgelessRootBlockComponent

nodes?: EdgelessBlockModel<GfxCompatibleProps>[]

surfaces?: SurfaceElementModel[]

edgelessBackground?

edgelessBackground.zoom?: number

Returns

Promise<undefined | HTMLCanvasElement>

Defined in

packages/blocks/src/_common/export-manager/export-manager.ts:408


exportPdf()

exportPdf(): Promise<void>

Returns

Promise<void>

Defined in

packages/blocks/src/_common/export-manager/export-manager.ts:544


exportPng()

exportPng(): Promise<void>

Returns

Promise<void>

Defined in

packages/blocks/src/_common/export-manager/export-manager.ts:571


replaceImgSrcWithSvg()

replaceImgSrcWithSvg(element): Promise<void>

Parameters

element: HTMLElement

Returns

Promise<void>

Defined in

packages/blocks/src/_common/export-manager/export-manager.ts:65