Skip to main content
Version: Next

IPC API

ConstantDirectionParametersReturnsDescription
READ_FILERenderer to MainfilePath: stringPromise<string>Reads a validated markdown file.
OPEN_FILE_DIALOGRenderer to MainnonePromise<string | null>Opens the native markdown picker.
OPEN_FOLDER_DIALOGRenderer to MainnonePromise<string | null>Opens the native folder picker.
READ_FOLDERRenderer to MainfolderPath: stringPromise<FileType>Reads a bounded markdown folder tree.
SEARCH_FOLDERRenderer to MainfolderPath, queryPromise<FolderSearchResult[]>Searches markdown files in an opened folder.
WATCH_FILERenderer to MainfilePath: stringPromise<void>Starts a validated markdown file watcher.
UNWATCH_FILERenderer to MainfilePath: stringPromise<void>Stops a file watcher.
FILE_CHANGEDMain to RendererfilePath: stringeventNotifies the renderer that a watched file changed.
GET_RECENT_FILESRenderer to MainnonePromise<RecentFile[]>Returns existing recent files.
ADD_RECENT_FILESRenderer to MainfilePath: stringPromise<void>Adds a file to recents.
GET_SETTINGSRenderer to MainnonePromise<AppSettings>Loads settings.
SAVE_SETTINGSRenderer to MainPartial<AppSettings>Promise<AppSettings>Validates and merges settings.
GET_APP_VERSIONRenderer to MainnonePromise<string>Returns app.getVersion().
EXPORT_HTMLRenderer to Mainhtml, css, outPathPromise<ExportResult>Writes HTML export.
EXPORT_PDFRenderer to Mainhtml, css, outPathPromise<ExportResult>Writes PDF export.
EXPORT_DOCXRenderer to Mainhtml, css, outPathPromise<ExportResult>Writes DOCX export.

Most handlers throw on untrusted senders, invalid paths, disallowed extensions, or paths that escape the opened folder root.

DOCX Export

DOCX export is currently treated as a bonus export format. Keep it covered by tests and IPC docs while it remains in the product.