Properties
appendBlockInPage
append
Block
In
Page
: ((page
: PageIdentity, content
: string, opts
?: Partial<{ properties
: {}; }>) => Promise<BlockEntity>)
Type declaration
-
- (page: PageIdentity, content: string, opts?: Partial<{
properties: {};
}>): Promise<BlockEntity>
-
Parameters
-
-
content: string
-
Optional
opts: Partial<{
properties: {};
}>
checkEditing
checkEditing: (() => Promise<string | boolean>)
Type declaration
-
- (): Promise<string | boolean>
-
Returns Promise<string | boolean>
createPage
create
Page
: ((pageName
: string, properties
?: {}, opts
?: Partial<{ createFirstBlock
: boolean; format
: "markdown" | "org"; journal
: boolean; redirect
: boolean; }>) => Promise<PageEntity>)
Type declaration
-
- (pageName: string, properties?: {}, opts?: Partial<{
createFirstBlock: boolean;
format: "markdown" | "org";
journal: boolean;
redirect: boolean;
}>): Promise<PageEntity>
-
Parameters
-
pageName: string
-
Optional
properties: {}
-
Optional
opts: Partial<{
createFirstBlock: boolean;
format: "markdown" | "org";
journal: boolean;
redirect: boolean;
}>
deletePage
deletePage: ((pageName: string) => Promise<void>)
Type declaration
-
- (pageName: string): Promise<void>
-
Returns Promise<void>
editBlock
edit
Block
: ((srcBlock
: BlockIdentity, opts
?: { pos
: number; }) => Promise<void>)
Type declaration
-
- (srcBlock: BlockIdentity, opts?: {
pos: number;
}): Promise<void>
-
Parameters
-
-
Optional
opts: {
pos: number;
}
Returns Promise<void>
exitEditingMode
exitEditingMode: ((selectBlock?: boolean) => Promise<void>)
Type declaration
-
- (selectBlock?: boolean): Promise<void>
-
Parameters
-
Optional
selectBlock: boolean
Returns Promise<void>
getAllPages
get
All
Pages
: ((repo
?: string) => Promise<PageEntity[]>)
getBlock
Type declaration
-
- (srcBlock: number | BlockIdentity, opts?: Partial<{
includeChildren: boolean;
}>): Promise<BlockEntity>
-
Parameters
-
-
Optional
opts: Partial<{
includeChildren: boolean;
}>
getBlockProperty
get
Block
Property
: ((block
: BlockIdentity, key
: string) => Promise<any>)
Type declaration
-
- (block: BlockIdentity, key: string): Promise<any>
-
Returns Promise<any>
getCurrentPageBlocksTree
get
Current
Page
Blocks
Tree
: (() => Promise<BlockEntity[]>)
getEditingBlockContent
getEditingBlockContent: (() => Promise<string>)
Type declaration
-
- (): Promise<string>
-
Returns Promise<string>
getPage
get
Page
: ((srcPage
: number | PageIdentity, opts
?: Partial<{ includeChildren
: boolean; }>) => Promise<PageEntity>)
Type declaration
-
- (srcPage: number | PageIdentity, opts?: Partial<{
includeChildren: boolean;
}>): Promise<PageEntity>
-
Parameters
-
-
Optional
opts: Partial<{
includeChildren: boolean;
}>
getPagesFromNamespace
get
Pages
From
Namespace
: ((namespace
: string) => Promise<PageEntity[]>)
getPagesTreeFromNamespace
get
Pages
Tree
From
Namespace
: ((namespace
: string) => Promise<PageEntity[]>)
insertAtEditingCursor
insertAtEditingCursor: ((content: string) => Promise<void>)
Type declaration
-
- (content: string): Promise<void>
-
Returns Promise<void>
insertBatchBlock
Type declaration
-
- (srcBlock: BlockIdentity, batch: IBatchBlock | IBatchBlock[], opts?: Partial<{
before: boolean;
keepUUID: boolean;
sibling: boolean;
}>): Promise<BlockEntity[]>
-
Parameters
-
-
-
Optional
opts: Partial<{
before: boolean;
keepUUID: boolean;
sibling: boolean;
}>
insertBlock
insert
Block
: ((srcBlock
: BlockIdentity, content
: string, opts
?: Partial<{ before
: boolean; customUUID
: string; focus
: boolean; isPageBlock
: boolean; properties
: {}; sibling
: boolean; }>) => Promise<BlockEntity>)
Type declaration
-
- (srcBlock: BlockIdentity, content: string, opts?: Partial<{
before: boolean;
customUUID: string;
focus: boolean;
isPageBlock: boolean;
properties: {};
sibling: boolean;
}>): Promise<BlockEntity>
-
Parameters
-
-
content: string
-
Optional
opts: Partial<{
before: boolean;
customUUID: string;
focus: boolean;
isPageBlock: boolean;
properties: {};
sibling: boolean;
}>
moveBlock
move
Block
: ((srcBlock
: BlockIdentity, targetBlock
: BlockIdentity, opts
?: Partial<{ before
: boolean; children
: boolean; }>) => Promise<void>)
Type declaration
-
- (srcBlock: BlockIdentity, targetBlock: BlockIdentity, opts?: Partial<{
before: boolean;
children: boolean;
}>): Promise<void>
-
Parameters
-
-
-
Optional
opts: Partial<{
before: boolean;
children: boolean;
}>
Returns Promise<void>
newBlockUUID
newBlockUUID: (() => Promise<string>)
Type declaration
-
- (): Promise<string>
-
Returns Promise<string>
onInputSelectionEnd
on
Input
Selection
End
: IUserHook<{ caret
: any; end
: number; point
: { x
: number; y
: number; }; start
: number; text
: string; }, IUserOffHook>
openInRightSidebar
openInRightSidebar: ((uuid: string) => void)
Type declaration
-
- (uuid: string): void
-
Returns void
prependBlockInPage
prepend
Block
In
Page
: ((page
: PageIdentity, content
: string, opts
?: Partial<{ properties
: {}; }>) => Promise<BlockEntity>)
Type declaration
-
- (page: PageIdentity, content: string, opts?: Partial<{
properties: {};
}>): Promise<BlockEntity>
-
Parameters
-
-
content: string
-
Optional
opts: Partial<{
properties: {};
}>
registerBlockContextMenuItem
registerHighlightContextMenuItem
register
Highlight
Context
Menu
Item
: ((label
: string, action
: SimpleCommandCallback<any>, opts
?: { clearSelection
: boolean; }) => unknown)
Type declaration
-
- (label: string, action: SimpleCommandCallback<any>, opts?: {
clearSelection: boolean;
}): unknown
-
Parameters
-
label: string
-
-
Optional
opts: {
clearSelection: boolean;
}
Returns unknown
removeBlockProperty
remove
Block
Property
: ((block
: BlockIdentity, key
: string) => Promise<void>)
Type declaration
-
- (block: BlockIdentity, key: string): Promise<void>
-
Returns Promise<void>
renamePage
renamePage: ((oldName: string, newName: string) => Promise<void>)
Type declaration
-
- (oldName: string, newName: string): Promise<void>
-
Parameters
-
oldName: string
-
newName: string
Returns Promise<void>
restoreEditingCursor
restoreEditingCursor: (() => Promise<void>)
Type declaration
-
- (): Promise<void>
-
Returns Promise<void>
saveFocusedCodeEditorContent
saveFocusedCodeEditorContent: (() => Promise<void>)
Type declaration
-
- (): Promise<void>
-
Returns Promise<void>
scrollToBlockInPage
scroll
To
Block
In
Page
: ((pageName
: string, blockId
: BlockIdentity, opts
?: { replaceState
: boolean; }) => void)
Type declaration
-
- (pageName: string, blockId: BlockIdentity, opts?: {
replaceState: boolean;
}): void
-
Parameters
-
pageName: string
-
-
Optional
opts: {
replaceState: boolean;
}
Returns void
setBlockCollapsed
setBlockCollapsed: ((uuid: string, opts: boolean | "toggle" | {
flag: boolean | "toggle";
}) => Promise<void>)
Type declaration
-
- (uuid: string, opts: boolean | "toggle" | {
flag: boolean | "toggle";
}): Promise<void>
-
Parameters
-
uuid: string
-
opts: boolean | "toggle" | {
flag: boolean | "toggle";
}
Returns Promise<void>
updateBlock
update
Block
: ((srcBlock
: BlockIdentity, content
: string, opts
?: Partial<{ properties
: {}; }>) => Promise<void>)
Type declaration
-
- (srcBlock: BlockIdentity, content: string, opts?: Partial<{
properties: {};
}>): Promise<void>
-
Parameters
-
-
content: string
-
Optional
opts: Partial<{
properties: {};
}>
Returns Promise<void>
upsertBlockProperty
upsert
Block
Property
: ((block
: BlockIdentity, key
: string, value
: any) => Promise<void>)
Type declaration
-
- (block: BlockIdentity, key: string, value: any): Promise<void>
-
Returns Promise<void>
Editor related APIs