Formatting text after a request to dataview

  1. How can I get the text hidden behind the spoiler as a result of a request to dataview ?
  2. How to print the text received after a request to dataview in a different color

For 1), you could use a folded callout. I do this for queries in my daily/weekly notes.

> [!tip]- Today's Notes
> ```dataview
> list
> file.cday
> where file.cday = date(2023-05-21)
> sort file.cday ASCENDING
> ```

For 2), a CSS snippet would work

body :is(.block-language-dataview) {
  --link-color: var(--color-orange);
  color: var(--color-pink);
}

  1. This is not exactly the case, I need to hide only part of the data under the spoiler, for example, the text that we get from the file.cday variable
  2. I didn’t really understand what to write in the dataview query? I need to highlight a certain word in the text in a different color

Could you give an example of typical output (with and without spoiler text) you would like to generate, and what should be the trigger to show the spoiler text.

I’m not entirely understanding your request.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.