-
-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: plugin-api.ts executeInline() #2077
Conversation
With this you can evaluate `=this.file.name` for example.
@blacksmithgu is there anything else I can do to expedite this merge? I have been writing some helpers using this change already. Thank you. |
Does this actually work as is? I believe you need to explicitly specify |
Yes sir. I have the following line working for my "inline burner" methods: app.plugins.plugins["dataview"].api.executeInline("this.file.name", file.path) This returns the file name of the given file path. |
Ah, my bad. I have to do some adjustments to this PR. I worked with .obsidian/plugin JS to get this, which loads everything in a single js. |
@blacksmithgu should be good to go now. Console test: app.plugins.plugins["dataview"].api.executeInline("this.file.name", 'Testing/UNO.md') Outputs:
|
Can this work on inlineJS ? |
I have seen some of the methods, but I have yet to use them for my needs, so I didn't expose them to the API. If this PR gets approved and merged by @blacksmithgu I can circle back and implement them next weekend. |
The code as written does not work since it was built against the raw JS file and not the actual typescript source. I've amended it to properly compile and adjusted it to be more idiomatic. It is available as |
With this you can evaluate
=this.file.name
for example.