Add Generic File embedding
This commit is contained in:
6 files changed
+308
-2
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user