Search
Preparing search index...
The search index is not available
Yank Note Api - v3.63.2
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Yank Note Api - v3.63.2
renderer/core/hook
Module renderer/core/hook
Index
Type aliases
Hook
Hook
Fun
Hook
Type
Hook
Type
With
Payload
Hook
Type
Without
Payload
Functions
register
Hook
remove
Hook
trigger
Hook
Type aliases
Hook
Hook
<
T
>
:
{
fun
:
HookFun
<
T
>
;
once
:
boolean
}
Type parameters
T
Type declaration
fun
:
HookFun
<
T
>
once
:
boolean
Hook
Fun
Hook
Fun
<
T
>
:
(
arg
:
T
)
=>
boolean
|
void
|
Promise
<
boolean
|
void
>
Type parameters
T
Type declaration
(
arg
:
T
)
:
boolean
|
void
|
Promise
<
boolean
|
void
>
Parameters
arg:
T
Returns
boolean
|
void
|
Promise
<
boolean
|
void
>
Hook
Type
Hook
Type
:
keyof
BuildInHookTypes
Hook
Type
With
Payload
Hook
Type
With
Payload
:
keyof
Omit
<
BuildInHookTypes
,
HookTypeWithoutPayload
>
Hook
Type
Without
Payload
Hook
Type
Without
Payload
:
{
[
K
in
keyof
BuildInHookTypes
]
:
BuildInHookTypes
[
K
]
extends
never
?
K
:
never
}
[
keyof
BuildInHookTypes
]
Functions
register
Hook
register
Hook
<
T
>
(
type
:
T
, fun
:
HookFun
<
BuildInHookTypes
[
T
]
>
, once
?:
boolean
)
:
void
Register a hook.
Type parameters
T
:
keyof
BuildInHookTypes
Parameters
type:
T
fun:
HookFun
<
BuildInHookTypes
[
T
]
>
once:
boolean
= false
Returns
void
remove
Hook
remove
Hook
<
T
>
(
type
:
T
, fun
:
HookFun
<
BuildInHookTypes
[
T
]
>
)
:
void
Remove a hook.
Type parameters
T
:
keyof
BuildInHookTypes
Parameters
type:
T
fun:
HookFun
<
BuildInHookTypes
[
T
]
>
Returns
void
trigger
Hook
trigger
Hook
<
T
>
(
type
:
T
)
:
Promise
<
void
>
trigger
Hook
<
T
>
(
type
:
T
, arg
:
undefined
, options
:
{
breakable
:
true
}
)
:
Promise
<
void
>
trigger
Hook
<
T
>
(
type
:
T
, arg
:
BuildInHookTypes
[
T
]
)
:
Promise
<
void
>
trigger
Hook
<
T
>
(
type
:
T
, arg
:
BuildInHookTypes
[
T
]
, options
:
{
breakable
:
true
;
ignoreError
?:
boolean
}
)
:
Promise
<
boolean
>
trigger
Hook
<
T
>
(
type
:
T
, arg
:
BuildInHookTypes
[
T
]
, options
?:
{
breakable
?:
false
;
ignoreError
?:
boolean
}
)
:
Promise
<
void
>
Trigger a hook.
Type parameters
T
:
HookTypeWithoutPayload
Parameters
type:
T
Returns
Promise
<
void
>
Type parameters
T
:
HookTypeWithoutPayload
Parameters
type:
T
arg:
undefined
options:
{
breakable
:
true
}
breakable
:
true
Returns
Promise
<
void
>
Type parameters
T
:
"GLOBAL_KEYDOWN"
|
"GLOBAL_KEYUP"
|
"DEEP_LINK_OPEN"
|
"ACTION_BEFORE_RUN"
|
"ACTION_AFTER_RUN"
|
"THEME_CHANGE"
|
"EDITOR_PASTE_IMAGE"
|
"MARKDOWN_BEFORE_RENDER"
|
"VIEW_ELEMENT_CLICK"
|
"VIEW_ELEMENT_DBCLICK"
|
"VIEW_KEY_DOWN"
|
"VIEW_SCROLL"
|
"VIEW_PREVIEWER_CHANGE"
|
"VIEW_RENDER_IFRAME_READY"
|
"EXPORT_BEFORE_PREPARE"
|
"EXPORT_AFTER_PREPARE"
|
"VIEW_ON_GET_HTML_FILTER_NODE"
|
"TREE_NODE_SELECT"
|
"TREE_NODE_DBLCLICK"
|
"MONACO_BEFORE_INIT"
|
"MONACO_READY"
|
"EDITOR_READY"
|
"EDITOR_CUSTOM_EDITOR_CHANGE"
|
"EDITOR_CURRENT_EDITOR_CHANGE"
|
"EDITOR_CONTENT_CHANGE"
|
"DOC_CREATED"
|
"DOC_DELETED"
|
"DOC_MOVED"
|
"DOC_PRE_SWITCH"
|
"DOC_BEFORE_SAVE"
|
"DOC_SAVED"
|
"DOC_BEFORE_SWITCH"
|
"DOC_SWITCHING"
|
"DOC_SWITCHED"
|
"DOC_SWITCH_FAILED"
|
"DOC_CHANGED"
|
"I18N_CHANGE_LANGUAGE"
|
"SETTING_PANEL_BEFORE_SHOW"
|
"SETTING_CHANGED"
|
"SETTING_FETCHED"
|
"SETTING_BEFORE_WRITE"
|
"EXTENSION_READY"
|
"CODE_RUNNER_CHANGE"
|
"PLUGIN_HOOK"
Parameters
type:
T
arg:
BuildInHookTypes
[
T
]
Returns
Promise
<
void
>
Type parameters
T
:
"GLOBAL_KEYDOWN"
|
"GLOBAL_KEYUP"
|
"DEEP_LINK_OPEN"
|
"ACTION_BEFORE_RUN"
|
"ACTION_AFTER_RUN"
|
"THEME_CHANGE"
|
"EDITOR_PASTE_IMAGE"
|
"MARKDOWN_BEFORE_RENDER"
|
"VIEW_ELEMENT_CLICK"
|
"VIEW_ELEMENT_DBCLICK"
|
"VIEW_KEY_DOWN"
|
"VIEW_SCROLL"
|
"VIEW_PREVIEWER_CHANGE"
|
"VIEW_RENDER_IFRAME_READY"
|
"EXPORT_BEFORE_PREPARE"
|
"EXPORT_AFTER_PREPARE"
|
"VIEW_ON_GET_HTML_FILTER_NODE"
|
"TREE_NODE_SELECT"
|
"TREE_NODE_DBLCLICK"
|
"MONACO_BEFORE_INIT"
|
"MONACO_READY"
|
"EDITOR_READY"
|
"EDITOR_CUSTOM_EDITOR_CHANGE"
|
"EDITOR_CURRENT_EDITOR_CHANGE"
|
"EDITOR_CONTENT_CHANGE"
|
"DOC_CREATED"
|
"DOC_DELETED"
|
"DOC_MOVED"
|
"DOC_PRE_SWITCH"
|
"DOC_BEFORE_SAVE"
|
"DOC_SAVED"
|
"DOC_BEFORE_SWITCH"
|
"DOC_SWITCHING"
|
"DOC_SWITCHED"
|
"DOC_SWITCH_FAILED"
|
"DOC_CHANGED"
|
"I18N_CHANGE_LANGUAGE"
|
"SETTING_PANEL_BEFORE_SHOW"
|
"SETTING_CHANGED"
|
"SETTING_FETCHED"
|
"SETTING_BEFORE_WRITE"
|
"EXTENSION_READY"
|
"CODE_RUNNER_CHANGE"
|
"PLUGIN_HOOK"
Parameters
type:
T
arg:
BuildInHookTypes
[
T
]
options:
{
breakable
:
true
;
ignoreError
?:
boolean
}
breakable
:
true
Optional
ignore
Error
?:
boolean
Returns
Promise
<
boolean
>
Type parameters
T
:
"GLOBAL_KEYDOWN"
|
"GLOBAL_KEYUP"
|
"DEEP_LINK_OPEN"
|
"ACTION_BEFORE_RUN"
|
"ACTION_AFTER_RUN"
|
"THEME_CHANGE"
|
"EDITOR_PASTE_IMAGE"
|
"MARKDOWN_BEFORE_RENDER"
|
"VIEW_ELEMENT_CLICK"
|
"VIEW_ELEMENT_DBCLICK"
|
"VIEW_KEY_DOWN"
|
"VIEW_SCROLL"
|
"VIEW_PREVIEWER_CHANGE"
|
"VIEW_RENDER_IFRAME_READY"
|
"EXPORT_BEFORE_PREPARE"
|
"EXPORT_AFTER_PREPARE"
|
"VIEW_ON_GET_HTML_FILTER_NODE"
|
"TREE_NODE_SELECT"
|
"TREE_NODE_DBLCLICK"
|
"MONACO_BEFORE_INIT"
|
"MONACO_READY"
|
"EDITOR_READY"
|
"EDITOR_CUSTOM_EDITOR_CHANGE"
|
"EDITOR_CURRENT_EDITOR_CHANGE"
|
"EDITOR_CONTENT_CHANGE"
|
"DOC_CREATED"
|
"DOC_DELETED"
|
"DOC_MOVED"
|
"DOC_PRE_SWITCH"
|
"DOC_BEFORE_SAVE"
|
"DOC_SAVED"
|
"DOC_BEFORE_SWITCH"
|
"DOC_SWITCHING"
|
"DOC_SWITCHED"
|
"DOC_SWITCH_FAILED"
|
"DOC_CHANGED"
|
"I18N_CHANGE_LANGUAGE"
|
"SETTING_PANEL_BEFORE_SHOW"
|
"SETTING_CHANGED"
|
"SETTING_FETCHED"
|
"SETTING_BEFORE_WRITE"
|
"EXTENSION_READY"
|
"CODE_RUNNER_CHANGE"
|
"PLUGIN_HOOK"
Parameters
type:
T
arg:
BuildInHookTypes
[
T
]
Optional
options:
{
breakable
?:
false
;
ignoreError
?:
boolean
}
Optional
breakable
?:
false
Optional
ignore
Error
?:
boolean
Returns
Promise
<
void
>
Modules
renderer/context
renderer/context/components
renderer/context/lib
renderer/core/action
renderer/core/hook
renderer/core/ioc
renderer/core/keybinding
renderer/core/plugin
renderer/services/base
renderer/services/document
renderer/services/editor
renderer/services/export
renderer/services/i18n
renderer/services/layout
renderer/services/markdown
renderer/services/runner
renderer/services/setting
renderer/services/status-
bar
renderer/services/theme
renderer/services/tree
renderer/services/view
renderer/services/workbench
renderer/support/api
renderer/support/args
renderer/support/embed
renderer/support/env
renderer/support/ga
renderer/support/jsonrpc
renderer/support/store
renderer/support/ui/context-
menu
renderer/support/ui/modal
renderer/support/ui/quick-
filter
renderer/support/ui/toast
renderer/types
renderer/utils
renderer/utils/composable
renderer/utils/crypto
renderer/utils/path
renderer/utils/storage
share/i18n
share/i18n/languages/en
share/i18n/languages/zh-
CN
Hook
Hook
Fun
Hook
Type
Hook
Type
With
Payload
Hook
Type
Without
Payload
register
Hook
remove
Hook
trigger
Hook
Generated using
TypeDoc
Register a hook.