From 0954d23a9dad832af8940488b8c5e8038c6ca94b Mon Sep 17 00:00:00 2001 From: Danielo Rodriguez Date: Wed, 11 Dec 2024 13:30:17 +0100 Subject: [PATCH] docs: file input example --- .../000 - Templates/file input example.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 EXAMPLE_VAULT/000 - Templates/file input example.md diff --git a/EXAMPLE_VAULT/000 - Templates/file input example.md b/EXAMPLE_VAULT/000 - Templates/file input example.md new file mode 100644 index 0000000..4f8d4c8 --- /dev/null +++ b/EXAMPLE_VAULT/000 - Templates/file input example.md @@ -0,0 +1,25 @@ +<%* +const modalForm = app.plugins.plugins.modalforms.api; +const result = await modalForm.openForm('file_input'); +tR += result.asFrontmatterString(); +console.log(result.file) +-%> + +Here is the file manually rendered + ![[<% result.file.value.name %>]] + +And here is the file leveraging the shorthand to get a markdown link +<% result.file.link %> + +Some TFile proxy properties: + +- path: <% result.file.value.path %> +- name: <% result.file.value.name %> +- basename: <% result.file.value.basename %> +- extension: <% result.file.value.extension %> + +Some TFile properties: + +- ctime: <% result.file.value.TFile.stat.ctime %> +- mtime: <% result.file.value.TFile.stat.mtime %> +- size: <% result.file.value.TFile.stat.size %>