generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
48b62af
commit 0954d23
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %> |