Closed bluerosegarden closed 11 months ago
The following should already work:
type A {
fields {
date: Date = "today"
}
}
as well as tomorrow
or +2w
or something else.
The slight problem is that the feature is not completely ready and you need to additionally press Enter
or Cmd+Enter
on that field to seal the rendered value, because otherwise it will save the note with date :: today
instead of date :: 2023-11-30
.
I think I've just fixed the aforementioned problem, so the fix will be included into the next release.
As for your question about JS, you can use import
syntax inside hooks, actions, methods and marginals. (My documentation sucks and I am working on it.)
Example:
type A {
style {
header = fn"""
import {Component} from "./component.tsx"
return <Component />
"""
}
}
Thank you so much!! That's perfect, I can't wait for the update!
Also if I was more familiar with OTL I'd offer to help with the documentation writing hahaha.
Fixed in release 0.3.0
Hello! This as very quickly become one of my all-time favorite plugins for obsidian. However looking through the docs and I couldn't find a way to automatically set a field to the current date, nor documentation on how to include javascript in an OTL file so I could grab it that way. Is this a feature that exists? Thank you so much in advance!