Open asdafa3 opened 11 months ago
typing.otl
and a content of a typed note where the fields are not hidden but are configured to beYes, I am planning to provide support for some templating engine. In the meanwhile you can use <api.ui.Markdown />
, for example:
type A {
style {
header = fn"""
let var = 1
let text = `
# Some markdown text
with ${var} interpolation
`
return <api.ui.Markdown text={text} dedent />
"""
}
}
prefix = "A-{date:yyyyMMdd}"
with configurable format is plannedThank you for your response
For 2.: Im going to do that those days but currently Im not able to.
For 3.: But this way Im also stuck to the header right, which doesn't work in live preview and also the content in there is not modifiable right?
For 4.: Really looking forward to that
Beyond that, I have a further questions and mentions 😅:
Yes, headers/footers are not supported in live preview yet, but will be. Their content is not designed to be modifiable, they are configured type-wide.
When I mentioned integration with templater I meant it as another marginal type, so the header would be dynamic and rendered each time you open the note:
type A {
style {
header = templater"""
<< [[<% tp.date.now("YYYY-MM-DD", -1) %>]] | [[<% tp.date.now("YYYY-MM-DD", 1) %>]] >>
"""
}
}
If you meant something different, e.g. ability to specify the content template to be filled on note creation, I can put it on my roadmap too.
As for the new questions:
Cmd
or Ctrl
when submitting it (e.g. if you have List[Choice["one", "two"]]
, you can type on
, then press Cmd+Enter
and it will be added to the list). The Tag
type works only if you have dataview installed.Choice
, but dynamic: they scan which values this field has across the notes of this type and suggests them as options.Settings -> Community plugins -> Debug startup time
)? I think this may be related to the way I preload js and otl files, which I hope to optimize later.Thank you for clarification, I also understood marginal types like that. Although I think dynamic header and footer content would be handy as well, I actually meant a content template that gets inserted when the note is created, as you said, but is modifiable. If you could put that on your roadmap, that would be really great.
1./2. I didnt know that, but I figured it out now, thank you. Ok, I get now what you intend with tags, but is there a way to use them together with obsidian tags with #? That would be great to blend in with the rest of my notes.
I just thought about it and I would have like 2 feature requests / ideas too maybe, but they don't have that much priority, but would still be really nice to have.
Feature requests:
Hey, first of all I want to say, that you did an amazing piece of work here and I greatly appreciate and awaited this kind of contribution to the obsidian plugins. To me, it seems like a perfect bridge between the casual obsidian workflow and eg. capacities.io's with its object centered approach. I have a few questions though.
hide_inline_fields = "all"
inside styles, am I doing something wrong? I have a base type that adds this style to and all other types inherit that base type.