I would like to place an icon somewhere in the view template to indicate if a tiddler is in Markdown format. What filter syntax should I use? I think I would probably want to target the current-tiddler from the HistoryList? Any suggestions?
To add output only for the current-tiddler
in the $:HistoryList
:
<$list filter="[<currentTiddler>match{$:/HistoryList!!current-tiddler}]">...</$list>
To add output to a tiddler that is in Markdown format:
<$list filter="[<currentTiddler>type[text/x-markdown]]">...</$list>
To combine these two conditions:
<$list filter="[<currentTiddler>match{$:/HistoryList!!current-tiddler}type[text/x-markdown]]">...</$list>
enjoy,
-e
Why on the ViewTemplate? Once a tiddler is written, it doesn’t matter what it’s underlying type is.
In the EditTemplate, I could totally get that. And in that case I’d suggest something intuitive but unobtrusive, like the edit-text for the tiddler’s body is a slightly different shade or something.
Just one idea.
I often hide the tiddler type in the EditTemplate. And sometimes I forget the tiddler type. This makes it obvious and hard to ignore.