Generate new note using templater API from another plugin #1391
Unanswered
LeonardoGentile
asked this question in
Help
Replies: 1 comment 3 replies
-
Otherwise, I was wondering if I could extend the internal function / variable dynamically as described here https://silentvoid13.github.io/Templater/internal-functions/contribute.html Meaning that instead of creating a pr and submitting it, would it be possible if my plugin could extends templater at run-time? 🤔 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd want to create a new note using the templater command/api
Templater: Create new note from template
from outside templater.Context
I created some modules and scripts using https://github.com/polyipseity/obsidian-modules then I've created an almost black template that contains my user function entry point (defined as obsidian-modules)
So when templater generate a new note from this template, it executes my scripts that populate and move around the note. So far so good.
Now I wanted to embed all this logic into a single plugin, that means: my plugin will call templater
create_new
and pass my almost empty template to it. This template contains a single entry points to functions and module defined into my plugin.How would I do that?
Is it as simple as passing my template path to
create_new
? Also if my template contains user functions that are only stored in my plugin internals I don't think templater will be happy as user functions must be all defined under a certain path, isn't it?Any hint will be highly welcome 🙏
Beta Was this translation helpful? Give feedback.
All reactions