Add Generic File embedding

This commit is contained in:
AlexKucera committed 2025-09-05 17:41:18 +02:00
1 parent 2181b0cea3
commit 05f28f84f3
6 files changed
+308 -2

No files matched your search

+2
View File
@@ -20,6 +20,8 @@ export interface ExportConfig {
preserveFolderStructure?: boolean;
/** Whether to embed PDF files as attachments in the output PDF */
embedPdfFiles?: boolean;
/** Whether to embed all file types as attachments in the output PDF */
embedAllFiles?: boolean;
/** Display frontmatter as formatted text at the beginning of the document */
printFrontmatter?: boolean;
}
+12
View File
@@ -55,6 +55,18 @@ export class BehaviorSection implements ModalSection {
});
});
// Embed all files toggle
new Setting(this.container)
.setName('Embed all file types as attachments')
.setDesc('Embed all referenced file types (office documents, archives, etc.) as PDF attachments')
.addToggle(toggle => {
toggle
.setValue(state.settings.embedAllFiles !== false)
.onChange(value => {
state.updateSettings({ embedAllFiles: value });
});
});
// Print frontmatter toggle
new Setting(this.container)
.setName('Print frontmatter')
+1
View File
@@ -86,6 +86,7 @@ export class ModalState implements IModalState {
openAfterExport: this.settings.openAfterExport,
preserveFolderStructure: this.settings.preserveFolderStructure,
embedPdfFiles: this.settings.embedPdfFiles,
embedAllFiles: this.settings.embedAllFiles,
printFrontmatter: this.settings.printFrontmatter
};