BlockSuite API Documentation / @blocksuite/blocks / PageRootService
Class: PageRootService
Extends
Constructors
new PageRootService(options)
new PageRootService(
options
):PageRootService
Parameters
• options: BlockServiceOptions
Returns
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:16
Properties
copilot
readonly
copilot:Copilot
Inherited from
Source
packages/blocks/src/root-block/root-service.ts:53
disposables
readonly
disposables:DisposableGroup
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:14
editSession
readonly
editSession:EditSessionStorage
Inherited from
Source
packages/blocks/src/root-block/root-service.ts:52
exportManager
exportManager:
ExportManager
Inherited from
Source
packages/blocks/src/root-block/root-service.ts:56
fileDropManager
fileDropManager:
FileDropManager
Inherited from
Source
packages/blocks/src/root-block/root-service.ts:55
flavour
readonly
flavour:string
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:13
fontLoader
readonly
fontLoader:FontLoader
Inherited from
Source
packages/blocks/src/root-block/root-service.ts:51
slots
slots:
Object
slots.docLinkClicked
docLinkClicked:
Slot
<Object
>
Type declaration
blockId?
optional
blockId:string
docId
docId:
string
slots.editorModeSwitch
editorModeSwitch:
Slot
<"edgeless"
|"page"
>
slots.tagClicked
tagClicked:
Slot
<Object
>
Type declaration
tagId
tagId:
string
slots.viewportUpdated
viewportUpdated:
Slot
<Viewport
>
Source
packages/blocks/src/root-block/page/page-root-service.ts:7
specSlots
readonly
specSlots:BlockSpecSlots
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:15
std
readonly
std:BlockStdScope
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:12
transformers
transformers:
Object
transformers.html
html:
Object
=HtmlTransformer
transformers.html.exportDoc
exportDoc: (
doc
) =>Promise
<void
>
Parameters
• doc: Doc
Returns
Promise
<void
>
transformers.markdown
markdown:
Object
=MarkdownTransformer
transformers.markdown.exportDoc
exportDoc: (
doc
) =>Promise
<void
>
Parameters
• doc: Doc
Returns
Promise
<void
>
transformers.markdown.importMarkdown
importMarkdown: (
__namedParameters
) =>Promise
<void
>
Parameters
• __namedParameters: ImportMarkdownOptions
Returns
Promise
<void
>
transformers.zip
zip:
Object
=ZipTransformer
transformers.zip.exportDocs
exportDocs: (
collection
,docs
) =>Promise
<Blob
>
Parameters
• collection: DocCollection
• docs: Doc
[]
Returns
Promise
<Blob
>
transformers.zip.importDocs
importDocs: (
collection
,imported
) =>Promise
<Doc
[]>
Parameters
• collection: DocCollection
• imported: Blob
Returns
Promise
<Doc
[]>
Inherited from
Source
packages/blocks/src/root-block/root-service.ts:58
Accessors
collection
get
collection():DocCollection
Returns
Source
packages/framework/block-std/dist/service/index.d.ts:17
doc
get
doc():Doc
Returns
Source
packages/framework/block-std/dist/service/index.d.ts:18
getDocUpdatedAt
get
getDocUpdatedAt(): (docId
) =>Date
set
getDocUpdatedAt(value
):void
Parameters
• value
Returns
Function
Parameters
• docId:
string
Returns
Date
Source
packages/blocks/src/root-block/root-service.ts:95
getEditorMode
get
getEditorMode(): (docId
) =>"edgeless"
|"page"
set
getEditorMode(value
):void
Parameters
• value
Returns
Function
Parameters
• docId:
string
Returns
"edgeless"
|"page"
Source
packages/blocks/src/root-block/root-service.ts:85
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:166
selectedModels
get
selectedModels():BlockModel
<object
>[]
Returns
BlockModel
<object
>[]
Source
packages/blocks/src/root-block/root-service.ts:184
selectionManager
get
selectionManager():SelectionManager
Returns
Source
packages/framework/block-std/dist/service/index.d.ts:20
uiEventDispatcher
get
uiEventDispatcher():UIEventDispatcher
Returns
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:72
Methods
appendParagraph()
appendParagraph():
void
Returns
void
Inherited from
Source
packages/blocks/src/root-block/root-service.ts:210
bindHotKey()
bindHotKey(
keymap
,options
?):void
Parameters
• keymap: Record
<string
, UIEventHandler
>
• options?
• options.global?: boolean
Returns
void
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:28
dispose()
dispose():
void
Returns
void
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:22
getEmbedBlockOptions()
getEmbedBlockOptions(
url
):null
|EmbedOptions
Parameters
• url: string
Returns
null
| EmbedOptions
Inherited from
RootService
.getEmbedBlockOptions
Source
packages/blocks/src/root-block/root-service.ts:109
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?
• options.global?: boolean
Returns
void
Inherited from
Source
packages/framework/block-std/dist/service/index.d.ts:25
loadFonts()
loadFonts():
void
Returns
void
Inherited from
Source
packages/blocks/src/root-block/root-service.ts:188
mounted()
mounted():
void
Returns
void
Inherited from
Source
packages/blocks/src/root-block/root-service.ts:122
registerEmbedBlockOptions()
registerEmbedBlockOptions(
options
):void
Parameters
• options: EmbedOptions
Returns
void
Inherited from
RootService
.registerEmbedBlockOptions
Source
packages/blocks/src/root-block/root-service.ts:105
unmounted()
unmounted():
void
Returns
void
Inherited from
Source
packages/blocks/src/root-block/root-service.ts:118