How to use of some custom dataview variables in code block?

When using variables in block code, I don’t get values ​​in view mode. Please tell me how can I fix this?

View mode

You do not need the full 3-backtick codeblock to make those appear in view mode. Just the single backticks is enough.
Does that solve your problem, or do you need that in a codeblock for some reason? Could you replace the codeblock with e.g. a callout?

I need a button to copy to clipboard so I put it in a codeblock. I tried using Admonition and it solves the problem but sometimes it doesn’t look as compact as it seems to me


And when using codeblock it looks more compact and nicer in my opinion

1 Like