- triggerHook<T>(type): Promise<void>
Returns Promise<void>
- triggerHook<T>(type, arg, options): Promise<void>
Parameters
- type: T
- arg: undefined
- options: {
breakable: true;
}
Returns Promise<void>
- triggerHook<T>(type, arg): Promise<void>
Type Parameters
- T extends
| "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_SWITCH_SKIPPED"
| "DOC_CHANGED"
| "I18N_CHANGE_LANGUAGE"
| "SETTING_PANEL_BEFORE_SHOW"
| "SETTING_CHANGED"
| "SETTING_FETCHED"
| "SETTING_BEFORE_WRITE"
| "EXTENSION_READY"
| "CODE_RUNNER_CHANGE"
| "PLUGIN_HOOK"
Returns Promise<void>
- triggerHook<T>(type, arg, options): Promise<boolean>
Type Parameters
- T extends
| "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_SWITCH_SKIPPED"
| "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
ignoreError?: boolean
Returns Promise<boolean>
- triggerHook<T>(type, arg, options?): Promise<void>
Type Parameters
- T extends
| "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_SWITCH_SKIPPED"
| "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
ignoreError?: boolean
Returns Promise<void>
Trigger a hook.