feat: add document templates library with 10 templates

This commit is contained in:
2026-03-04 16:10:24 +05:30
parent ae7b333cea
commit 12dcd2d1a3
15 changed files with 552 additions and 2 deletions
+11
View File
@@ -3880,6 +3880,17 @@ ipcMain.on('open-table-generator', () => {
openTableGenerator();
});
// IPC Handler for loading document templates
ipcMain.handle('load-template', async (event, filename) => {
try {
const templatePath = path.join(__dirname, 'templates', filename);
return fs.readFileSync(templatePath, 'utf-8');
} catch (err) {
console.error('Failed to load template:', err);
return null;
}
});
// IPC Handler for saving pasted/dropped images
ipcMain.handle('save-pasted-image', async (event, { base64, ext }) => {
try {