Environment
Inkdrop global for dealing with packages, themes, menus, and the window.
An instance of this class is always available as the inkdrop
global.
Properties
- Name
commands
- Type
- object
- Description
A CommandRegistry instance.
- Name
components
- Type
- object
- Description
A ComponentManager instance.
- Name
config
- Type
- object
- Description
A Config instance.
- Name
contextMenu
- Type
- object
- Description
A ContextMenuManager instance.
- Name
devMode
- Type
- boolean
- Description
Boolean, true if Development Mode is enabled, false if disabled.
- Name
element
- Type
- component
- Description
A React root component.
- Name
keymaps
- Type
- object
- Description
A KeymapManager instance.
- Name
layouts
- Type
- object
- Description
A LayoutManager instance.
- Name
main
- Type
- object
- Description
A reference to an InkdropApplication instance in the main process.
- Name
menu
- Type
- object
- Description
A MenuManager instance.
- Name
notifications
- Type
- object
- Description
A NotificationManager instance.
- Name
packages
- Type
- object
- Description
A PackageManager instance.
- Name
resourcePath
- Type
- string
- Description
A path to the app's bundled resource directory. For example, usually
"/Applications/Inkdrop.app/Contents/Resources/app.asar"
on macOS.
- Name
themes
- Type
- object
- Description
A ThemeManager instance.
- Name
styles
- Type
- object
- Description
A StyleManager instance.
- Name
store
- Type
- object
- Description
A Redux store.
- Name
window
- Type
- object
- Description
A BrowserWindow instance of the current window.
Editor Load Event
Invoke the given callback when the editor has been loaded.
Parameters
- Name
callback(editor)
- Type
- function
- Required
- Description
Function to be called when the editor loads, where
editor
is the instance of MDE that was loaded.
Returns
Returns a Disposable on which .dispose()
can be called to unsubscribe.
Editor Unload Event
Invoke the given callback when the editor has been unloaded.
Parameters
- Name
callback()
- Type
- function
- Required
- Description
Function to be called when the editor unloads.
Returns
Returns a Disposable on which .dispose()
can be called to unsubscribe.
App Readiness Event
Invoke the given callback when the app is ready.
Parameters
- Name
callback()
- Type
- function
- Required
- Description
Function to be called when the app is ready.
Returns
Returns a Disposable on which .dispose()
can be called to unsubscribe.
App Quit Event
Invoke the given callback when the app is about to quit.
Parameters
- Name
callback()
- Type
- function
- Required
- Description
Function to be called before the app quits.
Returns
Returns a Disposable on which .dispose()
can be called to unsubscribe.
Is Editor Active
Check if the editor is currently active.
Returns
Returns a Boolean indicating whether the editor is active.
Get Active Editor
Retrieve the active editor instance.
Get Active Editor with Error Handling
Retrieve the active editor instance or throw an error if it's not available.
Set Active Editor
Set the currently active editor instance.
Parameters
- Name
editor
- Type
- MDE
- Required
- Description
The MDE instance to set as the active editor.