BlockSuite API Documentation / @blocksuite/blocks / EdgelessPageService
Class: EdgelessPageService
Extends
Constructors
new EdgelessPageService(options)
new EdgelessPageService(
options
):EdgelessPageService
Parameters
• options: BlockServiceOptions
Returns
Inherited from
@blocksuite/blocks.PageService.constructor
Source
packages/framework/block-std/dist/service/index.d.ts:16
Properties
TemplateJob
TemplateJob: typeof
TemplateJob
=TemplateJob
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:52
_frame
private
_frame:EdgelessFrameManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:80
_layer
private
_layer:LayerManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:79
_selection
private
_selection:EdgelessSelectionManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:82
_snap
private
_snap:EdgelessSnapManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:81
_surface
private
_surface:SurfaceBlockModel
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:78
_tool
private
_tool:EdgelessToolsManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:84
_viewport
private
_viewport:Viewport
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:83
disposables
readonly
disposables:DisposableGroup
Inherited from
@blocksuite/blocks.PageService.disposables
Source
packages/framework/block-std/dist/service/index.d.ts:14
editSession
readonly
editSession:EditSessionStorage
Inherited from
@blocksuite/blocks.PageService.editSession
Source
packages/blocks/src/page-block/page-service.ts:49
exportManager
exportManager:
ExportManager
Inherited from
@blocksuite/blocks.PageService.exportManager
Source
packages/blocks/src/page-block/page-service.ts:52
fileDropManager
fileDropManager:
FileDropManager
Inherited from
@blocksuite/blocks.PageService.fileDropManager
Source
packages/blocks/src/page-block/page-service.ts:51
flavour
readonly
flavour:string
Inherited from
@blocksuite/blocks.PageService.flavour
Source
packages/framework/block-std/dist/service/index.d.ts:13
fontLoader
readonly
fontLoader:FontLoader
Inherited from
@blocksuite/blocks.PageService.fontLoader
Source
packages/blocks/src/page-block/page-service.ts:48
slots
slots:
Object
Type declaration
copyAsPng
copyAsPng:
Slot
<Object
>
Type declaration
blocks
blocks:
TopLevelBlockModel
[]
shapes
shapes:
CanvasElement
[]
cursorUpdated
cursorUpdated:
Slot
<string
>
draggingAreaUpdated
draggingAreaUpdated:
Slot
<void
>
edgelessToolUpdated
edgelessToolUpdated:
Slot
<EdgelessTool
>
elementResizeEnd
elementResizeEnd:
Slot
<void
>
elementResizeStart
elementResizeStart:
Slot
<void
>
fullScreenToggled
fullScreenToggled:
Slot
<void
>
navigatorFrameChanged
navigatorFrameChanged:
Slot
<FrameBlockModel
>
navigatorSettingUpdated
navigatorSettingUpdated:
Slot
<Object
>
Type declaration
blackBackground?
blackBackground?:
boolean
fillScreen?
fillScreen?:
boolean
hideToolbar?
hideToolbar?:
boolean
pageLinkClicked
pageLinkClicked:
Slot
<Object
>
Type declaration
blockId?
blockId?:
string
pageId
pageId:
string
pressShiftKeyUpdated
pressShiftKeyUpdated:
Slot
<boolean
>
readonlyUpdated
readonlyUpdated:
Slot
<boolean
>
toggleNoteSlicer
toggleNoteSlicer:
Slot
<void
>
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:54
specSlots
readonly
specSlots:BlockSpecSlots
Inherited from
@blocksuite/blocks.PageService.specSlots
Source
packages/framework/block-std/dist/service/index.d.ts:15
std
readonly
std:BlockStdScope
Inherited from
@blocksuite/blocks.PageService.std
Source
packages/framework/block-std/dist/service/index.d.ts:12
transformers
transformers:
Object
Type declaration
html
html:
Object
=HtmlTransformer
html.exportPage
html.exportPage: (
page
) =>Promise
<void
>
Parameters
• page: Page
Returns
Promise
<void
>
markdown
markdown:
Object
=MarkdownTransformer
markdown.exportPage
markdown.exportPage: (
page
) =>Promise
<void
>
Parameters
• page: Page
Returns
Promise
<void
>
markdown.importMarkdown
markdown.importMarkdown: (
__namedParameters
) =>Promise
<void
>
Parameters
• __namedParameters: ImportMarkdownOptions
Returns
Promise
<void
>
zip
zip:
Object
=ZipTransformer
zip.exportPages
zip.exportPages: (
workspace
,pages
) =>Promise
<Blob
>
Parameters
• workspace: Workspace
• pages: Page
[]
Returns
Promise
<Blob
>
zip.importPages
zip.importPages: (
workspace
,imported
) =>Promise
<Page
[]>
Parameters
• workspace: Workspace
• imported: Blob
Returns
Promise
<Page
[]>
Inherited from
@blocksuite/blocks.PageService.transformers
Source
packages/blocks/src/page-block/page-service.ts:54
Accessors
blocks
get
blocks():EdgelessBlock
<EdgelessSelectableProps
>[]
Returns
EdgelessBlock
<EdgelessSelectableProps
>[]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:157
elements
get
elements():ElementModel
<BaseProps
>[]
sorted canvas elements
Returns
ElementModel
<BaseProps
>[]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:149
frame
get
frame():EdgelessFrameManager
Returns
EdgelessFrameManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:138
frames
get
frames():FrameBlockModel
[]
Returns
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:153
getPageMode
get
getPageMode(): (pageId
) =>"edgeless"
|"page"
set
getPageMode(value
):void
Parameters
• value: (pageId
) => "edgeless"
| "page"
Returns
Function
Parameters
• pageId:
string
Returns
"edgeless"
|"page"
Source
packages/blocks/src/page-block/page-service.ts:81
getPageUpdatedAt
get
getPageUpdatedAt(): (pageId
) =>Date
set
getPageUpdatedAt(value
):void
Parameters
• value: (pageId
) => Date
Returns
Function
Parameters
• pageId:
string
Returns
Date
Source
packages/blocks/src/page-block/page-service.ts:91
layer
get
layer():LayerManager
Returns
LayerManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:126
page
get
page():Page
Returns
Source
packages/framework/block-std/dist/service/index.d.ts:18
selectedBlocks
get
selectedBlocks():BlockElement
<BlockModel
<object
>,BlockService
<BlockModel
<object
>>,string
>[]
Returns
BlockElement
<BlockModel
<object
>, BlockService
<BlockModel
<object
>>, string
>[]
Source
packages/blocks/src/page-block/page-service.ts:210
selectedModels
get
selectedModels():BlockModel
<object
>[]
Returns
BlockModel
<object
>[]
Source
packages/blocks/src/page-block/page-service.ts:229
selection
get
selection():EdgelessSelectionManager
Returns
EdgelessSelectionManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:130
selectionManager
get
selectionManager():SelectionManager
Returns
Source
packages/framework/block-std/dist/service/index.d.ts:19
snap
get
snap():EdgelessSnapManager
Returns
EdgelessSnapManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:142
surface
get
surface():SurfaceBlockModel
Returns
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:122
tool
get
tool():EdgelessToolsManager
Returns
EdgelessToolsManager
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:118
uiEventDispatcher
get
uiEventDispatcher():UIEventDispatcher
Returns
Source
packages/framework/block-std/dist/service/index.d.ts:20
viewport
get
viewport():Viewport
Returns
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:134
viewportElement
get
viewportElement():HTMLElement
Returns
HTMLElement
Source
packages/blocks/src/page-block/page-service.ts:68
workspace
get
workspace():Workspace
Returns
Source
packages/framework/block-std/dist/service/index.d.ts:17
zoom
get
zoom():number
Returns
number
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:161
Methods
_initReadonlyListener()
private
_initReadonlyListener():void
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:182
_initSlotEffects()
private
_initSlotEffects():void
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:165
addBlock()
addBlock(
flavour
,props
,parent
?,parentIndex
?):string
Parameters
• flavour: string
• props: Record
<string
, unknown
>
• parent?: string
| BlockModel
<object
>
• parentIndex?: number
Returns
string
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:215
addElement()
addElement<
T
>(type
,props
):string
Type parameters
• T = Record
<string
, unknown
>
Parameters
• type: string
• props: T
Returns
string
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:201
bindHotKey()
bindHotKey(
keymap
,options
?):void
Parameters
• keymap: Record
<string
, UIEventHandler
>
• options?: Object
• options.global?: boolean
Returns
void
Inherited from
@blocksuite/blocks.PageService.bindHotKey
Source
packages/framework/block-std/dist/service/index.d.ts:27
createGroup()
createGroup(
elements
):string
Parameters
• elements: string
[] | EdgelessModel
[]
Returns
string
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:422
createGroupFromSelected()
createGroupFromSelected():
undefined
|string
Returns
undefined
| string
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:442
createTemplateJob()
createTemplateJob(
type
):TemplateJob
Parameters
• type: "template"
| "sticker"
Returns
TemplateJob
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:516
dispose()
dispose():
void
Returns
void
Inherited from
@blocksuite/blocks.PageService.dispose
Source
packages/framework/block-std/dist/service/index.d.ts:21
generateIndex()
generateIndex(
type
):string
Parameters
• type: string
Returns
string
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:196
getConnectors()
getConnectors(
element
):ConnectorElementModel
[]
Parameters
• element: string
| EdgelessModel
Returns
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:510
getElementById()
getElementById(
id
):ElementModel
<BaseProps
> |EdgelessBlock
<EdgelessSelectableProps
>
Parameters
• id: string
Returns
ElementModel
<BaseProps
> | EdgelessBlock
<EdgelessSelectableProps
>
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:259
getElementsByType()
getElementsByType<
K
>(type
):ElementModelMap
[K
][]
Type parameters
• K extends keyof ElementModelMap
Parameters
• type: K
Returns
ElementModelMap
[K
][]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:228
getEmbedBlockOptions()
getEmbedBlockOptions(
url
):null
|EmbedOptions
Parameters
• url: string
Returns
null
| EmbedOptions
Inherited from
@blocksuite/blocks.PageService.getEmbedBlockOptions
Source
packages/blocks/src/page-block/page-service.ts:105
getFitToScreenData()
getFitToScreenData(
padding
):Object
Parameters
• padding: [number
, number
, number
, number
]= undefined
Returns
Object
centerX
centerX:
number
centerY
centerY:
number
zoom
zoom:
number
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:565
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.PageService.handleEvent
Source
packages/framework/block-std/dist/service/index.d.ts:24
loadFonts()
loadFonts():
void
Returns
void
Inherited from
@blocksuite/blocks.PageService.loadFonts
Source
packages/blocks/src/page-block/page-service.ts:233
mounted()
mounted():
void
Returns
void
Overrides
@blocksuite/blocks.PageService.mounted
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:86
pickElement()
pickElement(x, y, options)
pickElement(
x
,y
,options
):EdgelessModel
[]
Parameters
• x: number
• y: number
• options: Object
• options.all: true
Returns
EdgelessModel
[]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:266
pickElement(x, y, options)
pickElement(
x
,y
,options
?):null
|EdgelessModel
Parameters
• x: number
• y: number
• options?: Object
• options.all?: false
Returns
null
| EdgelessModel
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:267
pickElementInGroup()
pickElementInGroup(
x
,y
,options
?):null
|EdgelessModel
This method is used to pick element in group, if the picked element is in a group, we will pick the group instead. If that picked group is currently selected, then we will pick the element itself.
Parameters
• x: number
• y: number
• options?: HitTestOptions
Returns
null
| EdgelessModel
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:378
pickElementsByBound()
pickElementsByBound(bound, type)
pickElementsByBound(
bound
,type
?):EdgelessModel
[]
Parameters
• bound: Bound
| IBound
• type?: "all"
Returns
EdgelessModel
[]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:326
pickElementsByBound(bound, type)
pickElementsByBound(
bound
,type
):EdgelessBlock
<EdgelessSelectableProps
>[]
Parameters
• bound: Bound
| IBound
• type: "blocks"
Returns
EdgelessBlock
<EdgelessSelectableProps
>[]
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:327
registerEmbedBlockOptions()
registerEmbedBlockOptions(
options
):void
Parameters
• options: EmbedOptions
Returns
void
Inherited from
@blocksuite/blocks.PageService.registerEmbedBlockOptions
Source
packages/blocks/src/page-block/page-service.ts:101
registerTool()
registerTool(
Tool
):void
Parameters
• Tool: EdgelessToolConstructor
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:506
removeElement()
removeElement(
id
):void
Parameters
• id: string
| EdgelessModel
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:247
reorderElement()
reorderElement(
element
,direction
):void
Parameters
• element: EdgelessModel
• direction: ReorderingDirection
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:416
setZoomByAction()
setZoomByAction(
action
):void
Parameters
• action: ZoomAction
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:600
setZoomByStep()
setZoomByStep(
step
):void
Parameters
• step: number
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:556
ungroup()
ungroup(
group
):void
Parameters
• group: GroupElementModel
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:476
unmounted()
unmounted():
void
Returns
void
Overrides
@blocksuite/blocks.PageService.unmounted
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:108
updateElement()
updateElement(
id
,props
):void
Parameters
• id: string
• props: Record
<string
, unknown
>
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:234
zoomToFit()
zoomToFit():
void
Returns
void
Source
packages/blocks/src/page-block/edgeless/edgeless-page-service.ts:560
Generated using TypeDoc and typedoc-plugin-markdown.