• Trigger a hook.

    Type Parameters

    Parameters

    • type: T

    Returns Promise<void>

  • Type Parameters

    Parameters

    • type: T
    • arg: undefined
    • options: {
          breakable: true;
      }
      • breakable: true

    Returns 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

    Returns 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]
    • options: {
          breakable: true;
          ignoreError?: boolean;
      }
      • breakable: true
      • OptionalignoreError?: boolean

    Returns 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]
    • Optionaloptions: {
          breakable?: false;
          ignoreError?: boolean;
      }
      • Optionalbreakable?: false
      • OptionalignoreError?: boolean

    Returns Promise<void>