Skip to content

BlockSuite API Documentation / @blocksuite/blocks / DocDisplayMetaService

Class: DocDisplayMetaService

Customize document display title and icon.

Supports the following blocks:

  • Inline View: AffineReference
  • Card View: EmbedLinkedDocBlockComponentEmbedEdgelessLinkedDocBlockComponent
  • Embed View: EmbedSyncedDocBlockComponentEmbedEdgelessSyncedDocBlockComponent

Extends

Implements

Constructors

new DocDisplayMetaService()

new DocDisplayMetaService(std): DocDisplayMetaService

Parameters

std

BlockStdScope

Returns

DocDisplayMetaService

Inherited from

LifeCycleWatcher.constructor

Defined in

packages/framework/block-std/dist/extension/lifecycle-watcher.d.ts:24

Properties

disposables

readonly disposables: Disposable[]

Defined in

packages/affine/shared/dist/services/doc-display-meta-service.d.ts:42


iconMap

readonly iconMap: WeakMap<Doc, Signal<TemplateResult>>

Defined in

packages/affine/shared/dist/services/doc-display-meta-service.d.ts:43


std

readonly std: BlockStdScope

Inherited from

LifeCycleWatcher.std

Defined in

packages/framework/block-std/dist/extension/lifecycle-watcher.d.ts:22


titleMap

readonly titleMap: WeakMap<Doc, Signal<string>>

Defined in

packages/affine/shared/dist/services/doc-display-meta-service.d.ts:44


icons

static icons: object

aliased

readonly aliased: TemplateResult<1>

deleted

readonly deleted: TemplateResult<1>

edgeless

readonly edgeless: TemplateResult<1>

linkedBlock

readonly linkedBlock: TemplateResult<1>

linkedEdgeless

readonly linkedEdgeless: TemplateResult<1>

linkedPage

readonly linkedPage: TemplateResult<1>

page

readonly page: TemplateResult<1>

Defined in

packages/affine/shared/dist/services/doc-display-meta-service.d.ts:32


key

static key: string

Overrides

LifeCycleWatcher.key

Defined in

packages/affine/shared/dist/services/doc-display-meta-service.d.ts:41

Methods

created()

created(): void

Called when std is created.

Returns

void

Inherited from

LifeCycleWatcher.created

Defined in

packages/framework/block-std/dist/extension/lifecycle-watcher.d.ts:29


dispose()

dispose(): void

Returns

void

Defined in

packages/affine/shared/dist/services/doc-display-meta-service.d.ts:46


icon()

icon(pageId, __namedParameters?): Signal<TemplateResult>

Parameters

pageId

string

__namedParameters?

DocDisplayMetaParams

Returns

Signal<TemplateResult>

Implementation of

DocDisplayMetaExtension.icon

Defined in

packages/affine/shared/dist/services/doc-display-meta-service.d.ts:47


mounted()

mounted(): void

Called when editor host is mounted. Which means the editor host emit the connectedCallback lifecycle event.

Returns

void

Inherited from

LifeCycleWatcher.mounted

Defined in

packages/framework/block-std/dist/extension/lifecycle-watcher.d.ts:34


rendered()

rendered(): void

Called when std.render is called.

Returns

void

Inherited from

LifeCycleWatcher.rendered

Defined in

packages/framework/block-std/dist/extension/lifecycle-watcher.d.ts:38


title()

title(pageId, __namedParameters?): Signal<string>

Parameters

pageId

string

__namedParameters?

DocDisplayMetaParams

Returns

Signal<string>

Implementation of

DocDisplayMetaExtension.title

Defined in

packages/affine/shared/dist/services/doc-display-meta-service.d.ts:48


unmounted()

unmounted(): void

Called when editor host is unmounted. Which means the editor host emit the disconnectedCallback lifecycle event.

Returns

void

Overrides

LifeCycleWatcher.unmounted

Defined in

packages/affine/shared/dist/services/doc-display-meta-service.d.ts:49


setup()

static setup(di): void

Parameters

di

Container

Returns

void

Overrides

LifeCycleWatcher.setup

Defined in

packages/affine/shared/dist/services/doc-display-meta-service.d.ts:45