{% if attachments -%} PDF: {%- for attachment in attachments | filterby("title", "endswith", ".pdf")%}
- "[[{{ attachment.title }}]]" {%- endfor %} {%- endif %} {% if accessDate -%} accessDate: {{ accessDate | format('YYYY-MM-DD') }} {%- endif %}
// Originally from the PDF++ plugin (https://github.com/RyotaUshio/obsidian-pdf-plus) | |
/** Selected subset of the "Show debug info" command's result with some additional entries. */ | |
export async function getObsidianDebugInfo(app: App) { | |
// This is an empty string if it's the default theme | |
const themeName = app.customCss.theme; | |
const themeManifest = app.customCss.themes[themeName]; | |
const numSnippets = app.customCss.snippets.filter((snippet) => app.customCss.enabledSnippets.has(snippet)).length; | |
const plugins = app.plugins.plugins; |
/** | |
This snippet was originally a part of PDF++ v1 (which is under development and not public yet). | |
https://github.com/RyotaUshio/obsidian-pdf-plus | |
Obsidian internally indexes Canvas files, but does not emit any events when metadata change. | |
Calling the `patchCanvasIndex` function allows you to listen to the `canvas-index-initialized` | |
and `canvas-index-changed` events. | |
The signatures are: | |
on(evt: 'canvas-index-changed', callback: (file: TFile, cache: CanvasCachedMetadata | null) => any, context?: any): EventRef; |
{% if attachments -%} PDF: {%- for attachment in attachments | filterby("title", "endswith", ".pdf")%}
abstract class FuzzyInputSuggest<Item> extends AbstractInputSuggest<Ranked<Item>> { | |
plugin: MyPlugin; | |
inputEl: HTMLInputElement; | |
constructor(plugin: MyPlugin, inputEl: HTMLInputElement) { | |
super(plugin.app, inputEl); | |
this.inputEl = inputEl; | |
this.plugin = plugin; | |
} |