On Monday, October 19, 2020 at 1:35:09 AM UTC-7, bimlas wrote:
>
> To make the question more accurate: my goal is to keep tiddlers of 
> different formats distinguishable by type type (Markdown, Asciidoc, 
> reStructuredText, LaTeX, etc.), but if that type is unknown to TiddlyWiki, 
> then I can view them as I do in a text editor.
>

Create a tiddler "ShowUnkownTiddlerTypeAsText", tagged with 
$:/tags/ViewTemplate, containing:
\define hidebody() <style> [data-tiddler-title="$(currentTiddler)$"] .tc-
tiddler-body { display:none; } </style>

<$list 
filter="[<currentTiddler>get[type]addprefix[$:/language/Docs/Types/]!is[shadow]!is[tiddler]]"
 
variable="unknown_type">
   <<hidebody>><pre><$text text={{!!text}}/></pre>
</$list>

Notes:
1) The hidebody() macro uses CSS to suppress the display of the tiddler 
body for the current tiddler
2) $list checks to see if the type field of the current tiddler is unknown 
to the system (i.e., doesn't have a $:/language/Docs/Types/... definition 
as either a shadow or regular system tiddler)

-e

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/08449769-a02b-4caf-b368-4e22c10d18a0o%40googlegroups.com.

Reply via email to