Display content of Macro Tiddler

68 views
Skip to first unread message

Torax Malu

unread,
Dec 4, 2019, 2:40:57 AM12/4/19
to TiddlyWiki

Hi!


I noticed several times while working with macro tiddler, that the content is only displayed in edit mode. Is there an option / add-on, which shows the macro itself instead of the interpreted result without switching to edit mode?


Thanks and cheers


ToraxMalu

Mohammad

unread,
Dec 4, 2019, 2:44:55 AM12/4/19
to TiddlyWiki
Yes,
 One solution is using Utility plugin



The other is to write your own ViewTemplate as below

<$list filter="[all[current]tag[$:/tags/Macro]]">
<pre><$view/></pre>
</$list>


Good luck

Torax Malu

unread,
Dec 4, 2019, 12:08:21 PM12/4/19
to TiddlyWiki
Hi Mohammad,

thanks for the post. Well, even if I am appears stupid - how I can create a own ViewTemplate? Or is this documented anywhere?

Thanks and cheers.

Torax

Mark S.

unread,
Dec 4, 2019, 12:16:48 PM12/4/19
to TiddlyWiki
Tag the tiddler $:/tags/ViewTemplate.

Surprisingly, I don't this use is discussed directly on TiddlyWiki.com. It's a pretty important feature.

TiddlyTweeter

unread,
Dec 4, 2019, 12:54:01 PM12/4/19
to TiddlyWiki
The "Not Quite Documented" is a thing we could address with a list of some outstanding items like this?
The main docs are good, but terse.
I added this to a list I'm keeping. For later.

Mark S. wrote:
Tag the tiddler $:/tags/ViewTemplate.

...  is  [not] discussed directly on TiddlyWiki.com. It's a pretty important feature

Torax Malu

unread,
Dec 4, 2019, 1:47:57 PM12/4/19
to TiddlyWiki
Thanks you two.

ILYA

unread,
Dec 4, 2019, 3:49:34 PM12/4/19
to tiddl...@googlegroups.com
I am having the same problem. Often I want to know how tiddler is implemented to be able to copy/paste some parts of it. I can go to edit mode, but I always afraid to change source by accident. Is there any way to create a generic "view source" button for view toolbar? Which would work on any type of tiddler and toggle between source and rendered versions of the tiddler (or open the given tiddler in using view source template).

Best regards,
iilyak
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

TonyM

unread,
Dec 4, 2019, 8:13:56 PM12/4/19
to TiddlyWiki
Is there any way to create a generic "view source" button for view toolbar? Which would work on any type of tiddler and toggle between source and rendered versions of the tiddler (or open the given tiddler in using view source template).


This is very easy with basic tiddlywiki, just create a tiddler tagged  $:/tags/ViewTemplate then have a list widget that determines when to display the content in a <pre><$view/></pre> as per Mohammad. The filter on the list widget decides when to display the code view.

I have done this a number of times, and will do so again and share soon, as I have more ideas.

Here is some work in progress to decide which system tiddlers I automatically provide the code view for

<$list filter="[all[shadows+tiddlers]prefix[$:/]removeprefix[$:/]splitbefore[/]removesuffix[/]sort[]]">

</$list>

Still working

Tony


Reply all
Reply to author
Forward
0 new messages