Skip to content

BlockSuite API Documentation / @blocksuite/blocks / PageRootService

Class: PageRootService

Extends

Constructors

new PageRootService(options)

new PageRootService(options): PageRootService

Parameters

options: BlockServiceOptions

Returns

PageRootService

Inherited from

@blocksuite/blocks.RootService.constructor

Source

packages/framework/block-std/dist/service/index.d.ts:16

Properties

disposables

readonly disposables: DisposableGroup

Inherited from

@blocksuite/blocks.RootService.disposables

Source

packages/framework/block-std/dist/service/index.d.ts:14


editSession

readonly editSession: EditSessionStorage

Inherited from

@blocksuite/blocks.RootService.editSession

Source

packages/blocks/src/root-block/root-service.ts:52


exportManager

exportManager: ExportManager

Inherited from

@blocksuite/blocks.RootService.exportManager

Source

packages/blocks/src/root-block/root-service.ts:55


fileDropManager

fileDropManager: FileDropManager

Inherited from

@blocksuite/blocks.RootService.fileDropManager

Source

packages/blocks/src/root-block/root-service.ts:54


flavour

readonly flavour: string

Inherited from

@blocksuite/blocks.RootService.flavour

Source

packages/framework/block-std/dist/service/index.d.ts:13


fontLoader

readonly fontLoader: FontLoader

Inherited from

@blocksuite/blocks.RootService.fontLoader

Source

packages/blocks/src/root-block/root-service.ts:51


slots

slots: Object

Type declaration

docLinkClicked

docLinkClicked: Slot<Object>

Type declaration
blockId?

blockId?: string

docId

docId: string

tagClicked

tagClicked: Slot<Object>

Type declaration
tagId

tagId: string

viewportUpdated

viewportUpdated: Slot<Viewport>

Source

packages/blocks/src/root-block/page/page-root-service.ts:7


specSlots

readonly specSlots: BlockSpecSlots

Inherited from

@blocksuite/blocks.RootService.specSlots

Source

packages/framework/block-std/dist/service/index.d.ts:15


std

readonly std: BlockStdScope

Inherited from

@blocksuite/blocks.RootService.std

Source

packages/framework/block-std/dist/service/index.d.ts:12


transformers

transformers: Object

Type declaration

html

html: Object = HtmlTransformer

html.exportDoc

html.exportDoc: (doc) => Promise<void>

Parameters

doc: Doc

Returns

Promise<void>

markdown

markdown: Object = MarkdownTransformer

markdown.exportDoc

markdown.exportDoc: (doc) => Promise<void>

Parameters

doc: Doc

Returns

Promise<void>

markdown.importMarkdown

markdown.importMarkdown: (__namedParameters) => Promise<void>

Parameters

__namedParameters: ImportMarkdownOptions

Returns

Promise<void>

zip

zip: Object = ZipTransformer

zip.exportDocs

zip.exportDocs: (workspace, docs) => Promise<Blob>

Parameters

workspace: Workspace

docs: Doc[]

Returns

Promise<Blob>

zip.importDocs

zip.importDocs: (workspace, imported) => Promise<Doc[]>

Parameters

workspace: Workspace

imported: Blob

Returns

Promise<Doc[]>

Inherited from

@blocksuite/blocks.RootService.transformers

Source

packages/blocks/src/root-block/root-service.ts:57

Accessors

doc

get doc(): Doc

Returns

Doc

Source

packages/framework/block-std/dist/service/index.d.ts:18


getDocUpdatedAt

get getDocUpdatedAt(): (docId) => Date

set getDocUpdatedAt(value): void

Parameters

value: (docId) => Date

Returns

Function

Parameters

docId: string

Returns

Date

Source

packages/blocks/src/root-block/root-service.ts:94


getEditorMode

get getEditorMode(): (docId) => "edgeless" | "page"

set getEditorMode(value): void

Parameters

value: (docId) => "edgeless" | "page"

Returns

Function

Parameters

docId: string

Returns

"edgeless" | "page"

Source

packages/blocks/src/root-block/root-service.ts:84


host

get host(): HTMLElement

Returns

HTMLElement

Source

packages/framework/block-std/dist/service/index.d.ts:19


selectedBlocks

get selectedBlocks(): BlockElement<BlockModel<object>, BlockService<BlockModel<object>>, string>[]

Returns

BlockElement<BlockModel<object>, BlockService<BlockModel<object>>, string>[]

Source

packages/blocks/src/root-block/root-service.ts:213


selectedModels

get selectedModels(): BlockModel<object>[]

Returns

BlockModel<object>[]

Source

packages/blocks/src/root-block/root-service.ts:232


selectionManager

get selectionManager(): SelectionManager

Returns

SelectionManager

Source

packages/framework/block-std/dist/service/index.d.ts:20


uiEventDispatcher

get uiEventDispatcher(): UIEventDispatcher

Returns

UIEventDispatcher

Source

packages/framework/block-std/dist/service/index.d.ts:21


viewportElement

get viewportElement(): HTMLElement

Returns

HTMLElement

Source

packages/blocks/src/root-block/root-service.ts:71


workspace

get workspace(): Workspace

Returns

Workspace

Source

packages/framework/block-std/dist/service/index.d.ts:17

Methods

appendParagraph()

appendParagraph(): void

Returns

void

Inherited from

@blocksuite/blocks.RootService.appendParagraph

Source

packages/blocks/src/root-block/root-service.ts:258


bindHotKey()

bindHotKey(keymap, options?): void

Parameters

keymap: Record<string, UIEventHandler>

options?: Object

options.global?: boolean

Returns

void

Inherited from

@blocksuite/blocks.RootService.bindHotKey

Source

packages/framework/block-std/dist/service/index.d.ts:28


dispose()

dispose(): void

Returns

void

Inherited from

@blocksuite/blocks.RootService.dispose

Source

packages/framework/block-std/dist/service/index.d.ts:22


getEmbedBlockOptions()

getEmbedBlockOptions(url): null | EmbedOptions

Parameters

url: string

Returns

null | EmbedOptions

Inherited from

@blocksuite/blocks.RootService.getEmbedBlockOptions

Source

packages/blocks/src/root-block/root-service.ts:108


handleEvent()

handleEvent(name, fn, options?): void

Parameters

name: "click" | "doubleClick" | "tripleClick" | "pointerDown" | "pointerMove" | "pointerUp" | "pointerOut" | "dragStart" | "dragMove" | "dragEnd" | "keyDown" | "keyUp" | "selectionChange" | "compositionStart" | "compositionUpdate" | "compositionEnd" | "cut" | "copy" | "paste" | "beforeInput" | "blur" | "focus" | "drop" | "contextMenu" | "wheel"

fn: UIEventHandler

options?: Object

options.global?: boolean

Returns

void

Inherited from

@blocksuite/blocks.RootService.handleEvent

Source

packages/framework/block-std/dist/service/index.d.ts:25


loadFonts()

loadFonts(): void

Returns

void

Inherited from

@blocksuite/blocks.RootService.loadFonts

Source

packages/blocks/src/root-block/root-service.ts:236


mounted()

mounted(): void

Returns

void

Inherited from

@blocksuite/blocks.RootService.mounted

Source

packages/blocks/src/root-block/root-service.ts:121


registerEmbedBlockOptions()

registerEmbedBlockOptions(options): void

Parameters

options: EmbedOptions

Returns

void

Inherited from

@blocksuite/blocks.RootService.registerEmbedBlockOptions

Source

packages/blocks/src/root-block/root-service.ts:104


unmounted()

unmounted(): void

Returns

void

Inherited from

@blocksuite/blocks.RootService.unmounted

Source

packages/blocks/src/root-block/root-service.ts:117


Generated using TypeDoc and typedoc-plugin-markdown.