feat: add PDF embedding and frontmatter display controls
- Add embedPdfFiles setting to control PDF attachment embedding - Add printFrontmatter setting to display frontmatter as formatted text - Implement frontmatter formatting with proper line breaks and bullet lists - Add settings toggles to both plugin settings and export modal - Fix filename sanitization for PDF preview images with spaces - Ensure modal export config includes new behavior settings - Always generate PDF preview images regardless of embedding setting The frontmatter display formats long comma-separated values (like email lists) as bulleted lists and adds proper line breaks after each property label. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
7 files changed
+342
-112
No files matched your search
@@ -42,6 +42,30 @@ export class BehaviorSection implements ModalSection {
|
||||
state.updateSettings({ preserveFolderStructure: value });
|
||||
});
|
||||
});
|
||||
|
||||
// Embed PDF files toggle
|
||||
new Setting(this.container)
|
||||
.setName('Embed PDF files')
|
||||
.setDesc('Include PDF files as attachments in the exported PDF (in addition to preview images)')
|
||||
.addToggle(toggle => {
|
||||
toggle
|
||||
.setValue(state.settings.embedPdfFiles !== false)
|
||||
.onChange(value => {
|
||||
state.updateSettings({ embedPdfFiles: value });
|
||||
});
|
||||
});
|
||||
|
||||
// Print frontmatter toggle
|
||||
new Setting(this.container)
|
||||
.setName('Print frontmatter')
|
||||
.setDesc('Display frontmatter as formatted text at the beginning of the document')
|
||||
.addToggle(toggle => {
|
||||
toggle
|
||||
.setValue(state.settings.printFrontmatter || false)
|
||||
.onChange(value => {
|
||||
state.updateSettings({ printFrontmatter: value });
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
validate(): ValidationResult {
|
||||
|
||||
Reference in new issue
Block a user