List of commands
Inkdrop provides a bunch of commands to allow you to associate arbitrary interactions with the features.
You can bind them with keystrokes, menu and context menu from plugins, the init file or keymap config file.
Note that some commands like core:open-note require parameters so you have to invoke them programmatically with CommandRegistry like so:
inkdrop.commands.dispatch(document.body, 'core:open-note', {
noteId: 'note:uugSvPq5r'
})
Table of Contents
- Application commands
- Core commands
- Telescope commands
- Sidebar commands
- Editor commands
- AI commands
- Table editor commands
- Export commands
- Import commands
- View commands
- Window commands
- Special commands
Application commands
Special commands that run in the main process to control the Inkdrop app. To invoke them, do like so:
import { ipcRenderer } from 'electron'
ipcRenderer.send('command', 'application:about', {})
application:about
Shows a dialog about Inkdrop.
application:bring-all-windows-to-frontmacOS only
Arranges windows listed in the Window menu in front of all other windows.
application:check-for-update
Checks for available app updates.
application:cycle-through-windowsmacOS only
Cycles through open Inkdrop windows.
application:hidemacOS only
Hides Inkdrop windows.
application:hide-other-applicationsmacOS only
Hides all apps, except Inkdrop.
application:inspect
Shows a Developer Tools and inspects an element.
application:logout
Logs out from the currently authenticated account.
application:minimizemacOS only
Minimizes Inkdrop application.
application:open-preferences
Opens up the preference window.
application:open-website
Opens up the Inkdrop website.
application:open-website-signup
Opens up the Inkdrop sign-up page.
application:quit
Quits the app.
application:report-issue
Opens up the Inkdrop forum.
application:show-credits
Opens up the list of software licenses.
application:unhide-all-applicationsmacOS only
Unhides all apps, including Inkdrop.
application:view-help
Opens up the user manual.
application:view-api-doc
Opens up the API documentation website.
application:zoommacOS only
Toggles the size and location of the window between its standard state and its user state.
application:sync-db
Perform data sync from the last checkpointer.
application:quick-note
Create a note and show it in a separate window.
Core commands
core:copyin body
Copy the selected text to clipboard.
core:copy-imagein body
Copy the target element's image to clipboard.
core:copy-note-linkin body
Copy links to notes as Markdown links. By default, copy currently selected on the note list.
- Name
noteId- Type
- string|array
- Description
(Optional) The ID(s) of the note(s) to process.
core:copy-note-uriin body
Copy inkdrop:// URIs to notes. By default, copy currently selected on the note list.
- Name
noteId- Type
- string|array
- Description
(Optional) The ID(s) of the note(s) to process.
core:copy-link-addressin body
Copy the link address of an <a> element under the event target in the preview pane.
core:copy-preview-selectionin body
Copy the currently selected text in the preview pane to the clipboard.
core:cutin body
Delete the selected text and copy it to clipboard.
core:delete-notein body
Move notes currently selected on the note list to trash. If the notes are already in trash, they will be permanently deleted.
core:delete-notebook
core:delete-tag
core:duplicate-notein body
Duplicates notes currently selected on the note list.
core:emphasizein .mde-cm-wrapper
Emphasize currently selected text.
core:empty-trashin body
Empties trash.
core:filter-notesin body
Filters current note list items with given keywords.
- Name
keyword- Type
- string
- Required
- Description
The keywords to filter.
core:filter-by-tagin body
Adds a filter condition with specified tag.
- Name
tagId- Type
- string
- Required
- Description
The ID of the tag to filter by.
core:findin body
Activates the search bar.
core:find-focusin body
Moves focus to the search bar.
core:find-clearin body
Clears the search bar text.
core:find-globalin body
Moves focus to the search bar and switch the search scope to global.
- Name
focus- Type
- boolean
- Description
Whether to move focus to the search bar. Default:
true.
core:focus-nextin body
Moves focus to the next focusable UI component.
core:focus-note-list-barin body
Moves focus to the note list bar.
core:focus-previousin body
Moves focus to the previous focusable UI component.
core:indentin .mde-cm-wrapper
Indents the selected line(s).
core:insert-code-blockin .mde-cm-wrapper
Inserts a code block.
core:insert-horizontal-rulein .mde-cm-wrapper
Inserts a horizontal rule: * * *.
core:insert-linkin .mde-cm-wrapper
Inserts a link.
core:insert-imagein .mde-cm-wrapper
Shows a file picker and inserts the selected image into the editor at the cursor position.
core:move-notebook
core:move-to-notebook
core:navigate-backin body
Moves backward through the note open history.
core:navigate-forwardin body
Moves forward through the note open history.
core:new-notein body
Creates a new note and open it in the editor.
- Name
bookId- Type
- string
- Description
(Optional) The notebook ID to create the note in.
core:new-note-in-separate-windowin body
Creates a new note in a separate window. Uses the currently selected notebook if applicable.
core:new-note-from-selectionin body
Creates a new note from the selected text on the editor.
core:new-note-from-linkin body
Creates a new note from a link that targets an unresolved note in the preview pane.
- Name
title- Type
- string
- Required
- Description
The title of the new note (also used as the link label).
- Name
line- Type
- number
- Required
- Description
The line of the editor where the link appears.
- Name
newWindow- Type
- boolean
- Description
Whether to open the new note in a separate window.
core:new-notebookin body
Shows up a dialog for creating a new notebook.
- Name
parentBookId- Type
- string
- Description
A parent notebook ID. If
undefined, a notebook will be created under the root. Default:undefined
core:note-list-show-all-notesin body
Lists all notes on the note list bar.
- Name
selectFirstNote- Type
- boolean
- Description
Whether to select the first note or not. Default:
true
core:note-list-show-pinned-notesin body
Lists only the pinned notes on the note list bar.
- Name
selectFirstNote- Type
- boolean
- Description
Whether to select the first note or not. Default:
true
core:note-list-show-notes-in-trashin body
Lists notes in the trash on the note list bar.
- Name
selectFirstNote- Type
- boolean
- Description
Whether to select the first note or not. Default:
true
core:note-list-show-notes-in-bookin body
List notes in specified notebook on the note list bar
- Name
bookId- Type
- string
- Required
- Description
The notebook ID
- Name
tagId- Type
- string
- Description
The tag ID to filter items
- Name
status- Type
- NoteStatus
- Description
The note status which should be one of:
"none"or"active"or"onHold"or"completed"or"dropped"
- Name
selectFirstNote- Type
- boolean
- Description
Whether to select the first note or not. Default:
true
- Name
includeChildren- Type
- boolean
- Description
Whether to include the notes in the child notebooks. Default:
false
core:note-list-show-notes-with-tagin body
List notes with specified tag on the note list bar
- Name
tagId- Type
- string
- Required
- Description
The tag ID.
- Name
selectFirstNote- Type
- boolean
- Description
Whether to select the first note or not. Default:
true.
core:note-list-show-notes-with-statusin body
List notes with specified note status on the note list bar
- Name
status- Type
- NoteStatus
- Required
- Description
The note status which should be one of:
"none"or"active"or"onHold"or"completed"or"dropped".
- Name
selectFirstNote- Type
- boolean
- Description
Whether to select the first note or not. Default:
true.
core:note-list-show-notes-in-book-of-editing-notein body
List notes in a notebook of the currently editing note on the note list bar.
core:note-tags-bar-item-list-unselectin .note-tags-bar-item-list
Unselect items on the note tags bar.
core:note-tags-bar-item-list-select-previn .note-tags-bar-item-list
Select the previous item on the note tags bar.
core:note-tags-bar-item-list-select-nextin .note-tags-bar-item-list
Select the next item on the note tags bar.
core:note-tags-bar-item-list-remove-item-beforein .note-tags-bar-item-list
Remove the selected item and select its previous item on the note tags bar.
core:note-tags-bar-item-list-remove-itemin .note-tags-bar-item-list
Remove the target item on the note tags bar.
- Name
tagId- Type
- string
- Description
(Optional) The tag ID to remove.
core:open-first-notein body
Opens the first note of the note list bar in the editor.
core:open-next-notein body
Opens the next note of currently selected note on the note list bar.
core:open-prev-notein body
Opens the previous note of currently selected note on the note list bar.
core:close-notein body
Closes the currently editing note.
core:open-notein body
Opens a note with specified note ID.
- Name
noteId- Type
- string
- Required
- Description
The ID of the note to open.
- Name
revision- Type
- string
- Description
(Optional) Open the specific revision of the note.
- Name
selectInNoteListBar- Type
- boolean
- Description
Whether to select the correspond note in the note list bar. Default:
true.
- Name
pushState- Type
- boolean
- Description
Remember it in the navigation history. Default:
true.
- Name
newWindow- Type
- boolean
- Description
Whether to open the note in a separate window. Default:
false.
- Name
viewMode- Type
- EditorViewMode
- Description
The editor view mode to switch to after opening. One of
"edit","preview", or"sidebyside".
- Name
focus- Type
- boolean
- Description
Whether to focus the editor after opening. Default:
false.
core:open-note-in-separate-windowin body
Opens notes in separate windows. By default, opens notes selected on the note list bar.
- Name
noteId- Type
- string|array
- Description
(Optional) The ID(s) of the note(s) to open.
core:open-tag-settingsin body
Opens up the settings window for the tag with specified ID.
- Name
tagId- Type
- string
- Description
The ID of the tag to set.
core:pastein body
Pastes a text from clipboard.
core:paste-as-plain-textin body
Pastes a text from clipboard as plain text.
core:pin-note-to-topin body
Pin or unpin notes to the top of the note list. By default, applies to notes currently selected on the note list.
- Name
noteId- Type
- string|array
- Description
(Optional) The ID(s) of the note(s) to pin or unpin.
- Name
pinned- Type
- boolean
- Description
(Optional) The desired pinned state. If omitted, toggles the current state of the first target note.
core:popup-app-menuin body
Shows the application menu as a popup context menu (useful on Windows / Linux where the menu bar is hidden).
core:redoin body
Redoes the last undone change.
core:rename-notebook
core:save-imagein body
Saves the target element's image to disk.
core:save-notein body
Saves the currently editing note to the local database.
core:select-allin body
Select all text.
core:search-notesin body
Search notes globally with given keywords.
- Name
keyword- Type
- string
- Required
- Description
The keywords to search.
core:share-notein body
Shows up a dialog for sharing note with specified ID.
- Name
noteId- Type
- string
- Required
- Description
The ID of the note to be shared.
core:show-note-revisionsin body
Shows up a dialog for viewing note change history with specified ID.
- Name
noteId- Type
- string
- Required
- Description
The ID of the note to view its revision history.
core:strikethroughin .mde-cm-wrapper
Toggles strikethrough to the selected text.
core:strongin .mde-cm-wrapper
Toggles strong emphasis to the selected text.
core:toggle-blockquotein .mde-cm-wrapper
Toggles blockquote to the selected lines.
core:toggle-bulleted-listin .mde-cm-wrapper
Toggles bulleted list to the selected lines.
core:toggle-heading-1in .mde-cm-wrapper
Toggles h1 heading to the selected lines.
core:toggle-heading-2in .mde-cm-wrapper
Toggles h2 heading to the selected lines.
core:toggle-heading-3in .mde-cm-wrapper
Toggles h3 heading to the selected lines.
core:toggle-heading-4in .mde-cm-wrapper
Toggles h4 heading to the selected lines.
core:toggle-heading-biggerin .mde-cm-wrapper
Decreases heading level of the selected lines.
core:toggle-heading-smallerin .mde-cm-wrapper
Increases heading level of the selected lines.
core:toggle-numbered-listin .mde-cm-wrapper
Toggles ordered list to the selected lines.
core:toggle-task-listin .mde-cm-wrapper
Toggles task list to the selected lines.
core:toggle-inline-codein .mde-cm-wrapper
Toggles inline code block to the selected text.
- Name
selectionOnly- Type
- boolean
- Description
Whether to limit the toggle to the current selection only.
core:toggle-inline-mark-tagin .mde-cm-wrapper
Toggles an inline <mark> tag around the selected text.
core:undoin .mde-cm-wrapper
Undoes the last change.
core:unindentin .mde-cm-wrapper
Unindents the current lines.
core:insert-alertin .mde-cm-wrapper
Inserts an alert block with the specified type.
- Name
type- Type
- string
- Required
- Description
The type of the alert block. It should be one of "NOTE", "TIP", "IMPORTANT", "WARNING", or "CAUTION".
core:insert-alert-notein .mde-cm-wrapper
Inserts a note alert block.
core:insert-alert-tipin .mde-cm-wrapper
Inserts a tip alert block.
core:insert-alert-importantin .mde-cm-wrapper
Inserts an important alert block.
core:insert-alert-warningin .mde-cm-wrapper
Inserts a warning alert block.
core:insert-alert-cautionin .mde-cm-wrapper
Inserts a caution alert block.
Telescope commands
Telescope is the quick finder for commands, notebooks, tags, and more.
core:toggle-telescopein body
Opens Telescope if it is closed, or closes it if it is open.
core:show-telescopein body
Opens Telescope.
- Name
scopedSourceId- Type
- string
- Description
(Optional) Restrict the search to a specific source (e.g. commands, notebooks, tags).
- Name
scopedWorkspaceId- Type
- string|null
- Description
(Optional) Restrict the search to a specific workspace.
- Name
initialSelectedItemId- Type
- string|null
- Description
(Optional) The initially selected item.
- Name
cancelBehavior- Type
- string
- Description
(Optional) Behavior when canceling, e.g.
"close".
core:close-telescopein body
Closes Telescope.
core:telescope-clear-queryin body
Clears the Telescope query input.
core:telescope-clear-active-sourcein body
Clears the active scoped source in Telescope.
core:telescope-commandsin body
Opens Telescope scoped to the commands source.
core:telescope-notebooksin body
Opens Telescope scoped to the notebooks source.
core:telescope-tagsin body
Opens Telescope scoped to the tags source.
Sidebar commands
core:sidebar-focusin body
Moves focus to the side bar.
core:sidebar-select-next-itemin body
Select the next item of the side bar menu.
core:sidebar-select-prev-itemin body
Select the previous item of the side bar menu.
core:sidebar-select-itemin body
Activate the currently selected item.
core:sidebar-disclose-itemin body
Toggle the disclosure (expand/collapse) of the currently selected item.
core:sidebar-expand-itemin body
Expand the currently selected item.
core:sidebar-collapse-itemin body
Collapse the currently selected item.
core:sidebar-scroll-to-selectionin body
Scrolls the side bar to the currently selected item.
core:sidebar-open-workspace-menuin body
Open the workspace menu for a notebook.
- Name
bookId- Type
- string
- Description
(Optional) The notebook ID. If omitted, opens the current workspace.
- Name
selectFirstNote- Type
- boolean
- Description
Whether to select the first note in the workspace. Default:
true.
core:sidebar-hide-workspace-menuin body
Hide the workspace menu.
core:sidebar-workspace-go-upin body
Navigate one level up in the workspace menu.
Editor commands
editor:clear-findin body
Clears the text in the editor search bar.
- Name
focus- Type
- boolean
- Description
Whether to keep the search bar focused after clearing.
editor:toggle-regexin .cm-editor
Toggles regex matching in the editor search bar.
editor:toggle-case-sensitivein .cm-editor
Toggles case-sensitive matching in the editor search bar.
editor:change-note-status-nonein body
Set the note status of the editing note to None.
editor:change-note-status-activein body
Set the note status of the editing note to Active.
editor:change-note-status-onholdin body
Set the note status of the editing note to OnHold.
editor:change-note-status-completedin body
Set the note status of the editing note to Completed.
editor:change-note-status-droppedin body
Set the note status of the editing note to Dropped.
editor:delete-char-afterin .mde-cm-wrapper
Deletes the char after the cursor.
editor:delete-char-beforein .mde-cm-wrapper
Deletes the char before the cursor.
editor:delete-group-afterin .mde-cm-wrapper
Deletes the text group after the cursor.
editor:delete-group-beforein .mde-cm-wrapper
Deletes the text group before the cursor.
editor:delete-linein .mde-cm-wrapper
Deletes the line.
editor:delete-word-afterin .mde-cm-wrapper
Deletes the word after the cursor.
editor:delete-word-beforein .mde-cm-wrapper
Deletes the word before the cursor.
editor:delete-wrapped-line-leftin .mde-cm-wrapper
Deletes the wrapped line left.
editor:delete-wrapped-line-rightin .mde-cm-wrapper
Deletes the wrapped line right.
editor:edit-with-aiin .mde-cm-wrapper
Opens the AI inline assistant to edit the currently selected text. Does nothing if there is no selection.
editor:findin body
Toggles the editor search bar.
editor:find-nextin body
Locates the next item in the editor that matches criteria.
editor:find-previn body
Locates the previous item in the editor that matches criteria.
editor:find-textin body
Finds given text in the editor.
- Name
text- Type
- string
- Required
- Description
The text to find.
- Name
parseAsQuery- Type
- boolean
- Description
Whether to parse the text as a search query (with operators).
editor:focusin body
Focuses to the MDE or preview pane depending on the editor mode.
editor:focus-mdein body
Moves focus to the MDE.
editor:focus-previewin body
Moves focus to the preview pane.
editor:go-char-leftin .mde-cm-wrapper
Moves the cursor to one character left.
editor:go-char-rightin .mde-cm-wrapper
Moves the cursor to one character right.
editor:go-doc-endin .mde-cm-wrapper
Moves the cursor to the end of the document.
editor:go-doc-startin .mde-cm-wrapper
Moves the cursor to the start of the document.
editor:go-group-leftin .mde-cm-wrapper
Moves the cursor to one group left.
editor:go-group-rightin .mde-cm-wrapper
Moves the cursor to one group right.
editor:go-line-downin .mde-cm-wrapper
Moves the cursor to one line down.
editor:go-line-endin .mde-cm-wrapper
Moves the cursor to the line end.
editor:go-line-leftin .mde-cm-wrapper
Moves the cursor to the line left.
editor:go-line-rightin .mde-cm-wrapper
Moves the cursor to the line right.
editor:go-line-startin .mde-cm-wrapper
Moves the cursor to the line start.
editor:go-line-upin .mde-cm-wrapper
Moves the cursor to one line up.
editor:go-page-downin .mde-cm-wrapper
Moves the cursor to one page down.
editor:go-page-upin .mde-cm-wrapper
Moves the cursor to one page up.
editor:go-syntax-leftin .mde-cm-wrapper
Moves the cursor one syntax node to the left.
editor:go-syntax-rightin .mde-cm-wrapper
Moves the cursor one syntax node to the right.
editor:select-char-leftin .mde-cm-wrapper
Extends the selection by one character to the left.
editor:select-char-rightin .mde-cm-wrapper
Extends the selection by one character to the right.
editor:select-syntax-leftin .mde-cm-wrapper
Extends the selection one syntax node to the left.
editor:select-syntax-rightin .mde-cm-wrapper
Extends the selection one syntax node to the right.
editor:select-group-leftin .mde-cm-wrapper
Extends the selection by one group to the left.
editor:select-group-rightin .mde-cm-wrapper
Extends the selection by one group to the right.
editor:select-line-upin .mde-cm-wrapper
Extends the selection one line up.
editor:select-line-downin .mde-cm-wrapper
Extends the selection one line down.
editor:select-line-startin .mde-cm-wrapper
Extends the selection to the line start.
editor:select-line-endin .mde-cm-wrapper
Extends the selection to the line end.
editor:select-line-leftin .mde-cm-wrapper
Extends the selection to the line boundary on the left.
editor:select-line-rightin .mde-cm-wrapper
Extends the selection to the line boundary on the right.
editor:select-page-upin .mde-cm-wrapper
Extends the selection one page up.
editor:select-page-downin .mde-cm-wrapper
Extends the selection one page down.
editor:select-doc-startin .mde-cm-wrapper
Extends the selection to the start of the document.
editor:select-doc-endin .mde-cm-wrapper
Extends the selection to the end of the document.
editor:move-line-upin .mde-cm-wrapper
Moves the current line(s) up.
editor:move-line-downin .mde-cm-wrapper
Moves the current line(s) down.
editor:indentin .mde-cm-wrapper
Indents the currently selected line(s).
editor:indent-lessin .mde-cm-wrapper
Unindents the currently selected line(s).
editor:indent-morein .mde-cm-wrapper
Indents one more the currently selected line(s).
editor:insert-imagesin .mde-cm-wrapper
Inserts image files at the cursor to the editing note.
- Name
pos- Type
- object
- Description
Position to insert with the following keys:
- Name
ch- Type
- number
- Description
Character position.
- Name
line- Type
- number
- Description
Line position.
- Name
files- Type
- FileList|array
- Description
FileList, or an Array of File or NativeImage to insert.
You can override the default file drop handler like so:
Example
const mde = inkdrop.getActiveEditorOrThrowError()
inkdrop.commands.add(mde.wrapper.wrapper, {
'editor:insert-images': e => {
const { files, pos } = e
// Do something
// prevent the default behavior
e.stopPropagation()
}
})
editor:jump-to-linein .mde-cm-wrapper
Toggles a dialog which allows you to jump to the line at the specified number.
editor:kill-linein .mde-cm-wrapper
Deletes the line at the cursor.
editor:new-linein .mde-cm-wrapper
Inserts a plain new line at the cursor without continuing any Markdown markup.
editor:new-line-continue-markupin .mde-cm-wrapper
Inserts a new line and continues the current Markdown markup — list markers, ordered-list numbers, task list checkboxes, and blockquotes — then indents to match the surrounding block.
editor:open-linein .mde-cm-wrapper
Inserts a new line above the cursor.
editor:redo-selectionin .mde-cm-wrapper
Redoes the last selection.
editor:replacein body
Initiates the replace sequence in the editor.
editor:replace-nextin .cm-editor
Replaces the next occurrence in the editor.
editor:replace-allin .cm-editor
Replaces all occurrences in the editor.
editor:replace-selectionin .mde-cm-wrapper
Replaces selected text with the given text.
- Name
text- Type
- string
- Description
String, the text to replace.
editor:save-editor-scroll
editor:save-preview-scroll
editor:scroll-editor-to-linein body
Scrolls the editor to the given line.
- Name
line- Type
- number
- Description
Number, the destination line number.
editor:scroll-preview-to-linein body
Scrolls the preview to the given line.
- Name
line- Type
- number
- Description
Number, the destination line number.
editor:select-allin .mde-cm-wrapper
Selects all text in the editor.
editor:select-lines-downwardin .mde-cm-wrapper
Adds a cursor downward.
editor:select-lines-upwardin .mde-cm-wrapper
Adds a cursor upward.
editor:single-selectionin .mde-cm-wrapper
Removes all cursors except the primary one.
editor:sync-editor-scrollin body
Syncs the scroll position of the editor with the same position of the preview pane.
editor:sync-preview-scrollin body
Syncs the scroll position of the preview pane with the same position of the editor.
editor:focus-titlein body
Moves focus to the title input bar of the editor.
editor:focus-and-go-doc-startin body
Focuses the editor and moves the cursor to the start of the document.
editor:move-focus-to-nextin body
Moves focus from the title input bar to the next editable area.
editor:insert-textin body
Inserts the given text at the current cursor position.
- Name
text- Type
- string
- Required
- Description
The text to insert.
- Name
selection- Type
- object
- Description
(Optional) Selection to set after insertion, with
anchor(number) and optionalhead(number) offsets from the insertion position.
editor:open-linkin .mde-cm-wrapper
Opens the URL at the cursor in the default browser.
editor:copy-linkin .mde-cm-wrapper
Copies the URL at the cursor to the clipboard.
editor:paste-urlin .mde-cm-wrapper
Pastes a URL at the cursor. If text is selected, wraps it as a Markdown link.
- Name
url- Type
- string
- Required
- Description
The URL to paste.
editor:start-completionin .mde-cm-wrapper
Manually triggers the autocompletion popup.
editor:accept-completionin .mde-cm-wrapper
Accepts the currently highlighted completion suggestion.
editor:close-completionin .mde-cm-wrapper
Closes the autocompletion popup.
editor:move-completion-selection-upin .mde-cm-wrapper
Moves the highlighted completion suggestion up.
editor:move-completion-selection-downin .mde-cm-wrapper
Moves the highlighted completion suggestion down.
editor:move-completion-selection-page-upin .mde-cm-wrapper
Moves the highlighted completion suggestion up by a page.
editor:move-completion-selection-page-downin .mde-cm-wrapper
Moves the highlighted completion suggestion down by a page.
editor:refreshin body
Requests the editor to recompute its measurements (after layout changes).
editor:set-docin body
Replaces the entire editor content with the given body.
- Name
body- Type
- string
- Required
- Description
The new document body.
editor:toggle-line-numbersin body
Toggles line numbers in the editor.
editor:toggle-line-wrappingin body
Toggles soft line wrapping in the editor.
editor:toggle-readable-line-lengthin body
Toggles a maximum readable line length in the editor.
editor:toggle-limit-max-widthin body
Toggles whether the editor limits its maximum content width.
editor:add-code-languagein body
Registers a code language with the Markdown editor for fenced-code syntax highlighting.
- Name
lang- Type
- LanguageDescription
- Required
- Description
A CodeMirror
LanguageDescriptioninstance.
editor:remove-code-languagein body
Removes a previously registered code language.
- Name
name- Type
- string
- Required
- Description
The name of the language to remove.
editor:add-extensionin body
Adds a CodeMirror extension to the editor.
- Name
extension- Type
- Extension
- Required
- Description
A CodeMirror
Extension.
editor:remove-extensionin body
Removes a previously added CodeMirror extension.
- Name
extension- Type
- Extension
- Required
- Description
The extension to remove.
editor:add-markdown-extensionin body
Adds a Lezer Markdown extension to the parser.
- Name
extension- Type
- MarkdownExtension
- Required
- Description
A Lezer
MarkdownExtension.
editor:remove-markdown-extensionin body
Removes a previously added Markdown extension.
- Name
extension- Type
- MarkdownExtension
- Required
- Description
The extension to remove.
editor:add-slash-commandsin body
Registers additional items for the slash-command menu.
- Name
commands- Type
- SlashCommandList
- Required
- Description
The slash commands to add.
editor:remove-slash-commandsin body
Unregisters previously added slash-command items.
- Name
commands- Type
- SlashCommandList
- Required
- Description
The slash commands to remove.
editor:new-table-row-and-continuein .mde-cm-wrapper
Inserts a new row in the table at the cursor and continues editing.
editor:move-to-next-table-cellin .mde-cm-wrapper
Moves the cursor to the next cell of the table at the cursor.
editor:move-to-previous-table-cellin .mde-cm-wrapper
Moves the cursor to the previous cell of the table at the cursor.
editor:toggle-overwritein .mde-cm-wrapper
Toggles overwrite mode.
editor:toggle-task-listin .mde-cm-wrapper
Toggles task list to the current selections.
editor:transpose-charsin .mde-cm-wrapper
Transposes characters at the cursor.
editor:undo-selectionin .mde-cm-wrapper
Undoes the last selection.
editor:unindentin .mde-cm-wrapper
Unindents the current lines.
editor:show-notes-in-book-of-editing-notein body
Display notes in a notebook of the currently editing note on the note list bar.
editor:go-to-workspace-of-editing-notein body
Switches to the workspace of the notebook of the currently editing note.
core:toggle-editor-drawerin body
Toggle editor drawer.
core:show-editor-drawerin body
Show editor drawer.
core:close-editor-drawerin body
Hide editor drawer.
AI commands
Commands for managing the AI inline assistant. These are global commands you typically invoke programmatically (for example, from a plugin) to customize the built-in prompt presets shown when editing the selection with AI.
ai:add-inline-assistant-prompt-presetsin body
Adds prompt presets to the AI inline assistant. A preset whose ID matches an existing one replaces it; the rest are appended to the list.
- Name
presets- Type
- array
- Required
- Description
An array of preset objects, each with the following keys:
- Name
id- Type
- string
- Required
- Description
A unique identifier for the preset.
- Name
label- Type
- string
- Required
- Description
The label shown in the preset list.
- Name
prompt- Type
- string
- Required
- Description
The prompt sent to the AI when the preset is selected.
ai:remove-inline-assistant-prompt-presetsin body
Removes prompt presets from the AI inline assistant by ID.
- Name
ids- Type
- array
- Required
- Description
The IDs of the presets to remove.
Table editor commands
These commands operate while the cursor is inside a Markdown table.
table-editor:select-cellin .mde-cm-wrapper
Selects the contents of the current cell.
table-editor:next-cellin .mde-cm-wrapper
Moves to the next cell.
table-editor:previous-cellin .mde-cm-wrapper
Moves to the previous cell.
table-editor:next-rowin .mde-cm-wrapper
Moves to the next row.
table-editor:escapein .mde-cm-wrapper
Exits the table editing mode.
table-editor:move-leftin .mde-cm-wrapper
Moves one cell to the left.
table-editor:move-rightin .mde-cm-wrapper
Moves one cell to the right.
table-editor:move-upin .mde-cm-wrapper
Moves one cell up.
table-editor:move-downin .mde-cm-wrapper
Moves one cell down.
table-editor:align-leftin .mde-cm-wrapper
Aligns the current column to the left.
table-editor:align-rightin .mde-cm-wrapper
Aligns the current column to the right.
table-editor:align-centerin .mde-cm-wrapper
Aligns the current column to the center.
table-editor:align-nonein .mde-cm-wrapper
Removes column alignment.
table-editor:move-row-upin .mde-cm-wrapper
Moves the current row up.
table-editor:move-row-downin .mde-cm-wrapper
Moves the current row down.
table-editor:move-column-leftin .mde-cm-wrapper
Moves the current column to the left.
table-editor:move-column-rightin .mde-cm-wrapper
Moves the current column to the right.
table-editor:delete-columnin .mde-cm-wrapper
Deletes the current column.
table-editor:delete-rowin .mde-cm-wrapper
Deletes the current row.
table-editor:insert-columnin .mde-cm-wrapper
Inserts a new column.
table-editor:insert-rowin .mde-cm-wrapper
Inserts a new row.
table-editor:formatin .mde-cm-wrapper
Reformats the current table.
table-editor:format-allin .mde-cm-wrapper
Reformats all tables in the note.
Export commands
export-as-html:exportin body
Exports selected notes on the note list bar as HTML to disk.
export-as-markdown:allin body
Exports all notes as Markdown to disk.
export-as-markdown:singlein body
Exports the editing note as Markdown to disk.
export-print:export-as-pdfin body
Exports the editing note as PDF to disk.
export-print:printin body
Prints the editing note.
Import commands
import-html:import-from-filein body
Imports a note from a HTML file.
View commands
view:sort-by-title-in-ascin body
Sorts the note list by title in ascending order.
view:sort-by-title-in-descin body
Sorts the note list by title in descending order.
view:sort-by-date-created-in-ascin body
Sorts the note list by date created in ascending order.
view:sort-by-date-created-in-descin body
Sorts the note list by date created in descending order.
view:sort-by-date-updated-in-ascin body
Sorts the note list by date updated in ascending order.
view:sort-by-date-updated-in-descin body
Sorts the note list by date updated in descending order.
view:show-editorin body
Shows the editor pane.
view:show-previewin body
Shows the preview pane.
view:show-side-by-sidein body
Shows the editor and preview side by side.
view:toggle-distraction-freein body
Toggles distraction-free mode.
view:toggle-previewin body
Toggles the preview pane.
view:toggle-side-by-sidein body
Toggles the side-by-side mode.
view:toggle-sidebarin body
Toggles the side bar.
Window commands
window:closein body
Closes the window.
window:decrease-font-sizein body
Decreases the font size in the editor.
window:increase-font-sizein body
Increases the font size in the editor.
window:new-inkdrop-windowin body
Opens up a new window.
window:reloadin body
Reloads the window.
window:toggle-dev-toolsin body
Toggles the Developer Tools window.
window:toggle-full-screenin body
Toggles full screen mode.
Special commands
The following commands are special for controlling the key event handler.
native!
Triggers the default behavior of the key event.
unset!
Unbinds the existing keybinding.
abort!
Prevents the default behavior of the key event. It calls preventDefault on the event object.