I have a dataviewjs query on the top of a page I am writing and it keeps refreshing from time to time causing the page to jump.
Is there a way to specify and set a fixed callout height and we can then just scroll inside the callout to see the rest of the contents? Is this even possible to do?
hey, where should I input the above code? I tried putting it inside a dataviewjs codeblock but it shows error “unexpected .”.
I also tried this but there isn’t any changes in height?.. I tried with different contents and with and without any dataviewjs codeblock inside the callout, I don’t see any changes…
here is the callout that I am running for example:
> [!TODO] Page in development
> Have to start writing. Literature review done.
>
> ```dataviewjs
> // get all unique outlinks without .png and current note
> let notes = dv.current().file.outlinks
> .map(x => x.path)
> .filter((value, index, self) => index === self.indexOf(value))
> .where(x => !x.endsWith("png") && x != dv.current().file.path)
> .array();
>
> // push current file path in the first index of notes
> notes.unshift(dv.current().file.path);
>
> // printing tasks from unique outlinks
> let ntasks = notes.map(x => dv.page(x).file.tasks.where(t => !t.completed));
> ntasks.map(x => x.length > 0 && dv.taskList(x));
> ```
Oh, to use this code, do following:
Open a text editor, paste my code and save your file as txt if your text editor is unable to save css files. Then rename your snippets file extension to css
After adding the CSS snippet and activating it, typing > [!callout|15] didtn’t seem to work. But After referring to obsidian “customize callout” help page, I noticed that for the callout to work I have type the following instead
> [!15]
This worked.
But I don’t understand why the previous callout metadata you mentioned didn’t work here, Jopp? :\ Am I doing something wrong here?
Also is there a way that I can add this size over other types of callout? Like: