Hi, I am looking for a way to apply snippets only to notes from a specific folder. I’ve searched for plugins, searched the forums, searched the search engine and haven’t seen anyone having a similar problem.
For example, I don’t want to change the bold color globally, but only in the notes from “daily note”.
You can’t do this at the folder level as you would like without a plugin AFAIK. I haven’t tried the plugin @efemkay mentioned but you can do what you want at the file level using “cssclass” in the “Front Matter” without needing a plugin.
If you are using a template to make the daily notes you should be able to include the front matter right in the template.
At the top of your file you would need to add a 3 line block that starts with 3 dashes and ends with 3 dashes and in middle line use the "cssclass: " key followed by the name of the CSS class you want to apply. Like this:
---
cssclass: "customnote1"
---
If you already have a front matter block just add the cssclass line
You can reuse the colors for as many notes as you want, I only used each of them one time in the screenshot to save space.
The only caveat, besides needing to edit each file you want to change, is that the notes using the alternate formatting will have the front matter block showing in them at the top.
Thank you very much, this seems to be the best solution to my problem. Thanks a lot for the great explanation, the screenshots and the time you took to describe it all