blacksmithgu / obsidian-dataview

A data index and query language over Markdown files, for https://obsidian.md/.
https://blacksmithgu.github.io/obsidian-dataview/
MIT License
7.12k stars 419 forks source link

Headers are not foldable #666

Open charleshan opened 3 years ago

charleshan commented 3 years ago

What happened?

Headers should be folderable but it looks like headers that are created using dataviewjs are not.

DQL

dv.el("h1", "H1");
dv.el("h2", "H2 - This should be foldable but is not");

JS

No response

Dataview Version

0.4.20

Obsidian Version

0.12.19

OS

MacOS

blacksmithgu commented 3 years ago

I'm not sure I can fix this (easily at least) - this is built in Obsidian functionality that is added to headers before Dataview gets around to rendering them. This issue is also why embeds and some other things don't currently work in Dataview, by the way.

This may be possible with some future Obsidian API improvements.

cdloh commented 1 year ago

@blacksmithgu don't suppose this is any closer to being possible? Even if only in preview mode?

st-- commented 10 months ago

@blacksmithgu I'd also be keen to know what it would take to get this implemented (for similar functionality in the Tasks plugin) - what are your thoughts on using the <details> tag as a work-around?