custom document backend implemented

This commit is contained in:
santa
2026-01-08 14:25:14 +01:00
parent f81c9bc4e8
commit ed5a86dce0
4 changed files with 117 additions and 33 deletions
+12
View File
@@ -30,6 +30,18 @@ try {
file_download: () => {ipcRenderer.send("file_download")}
})
//documenttypes
contextBridge.exposeInMainWorld('api', {
getTxtFiles: () => ipcRenderer.invoke('get-txt-files'),
saveTxtFile: (name, content) =>
ipcRenderer.invoke('save-txt-file', name, content),
readTxtFile: (fileName) =>
ipcRenderer.invoke('read-txt-file', fileName)
});
ipcRenderer.on("error", (event, err) => {alert(err)})
} catch (error) {