Getting the input and output of a tiddler

74 views
Skip to first unread message

Joe Armstrong

unread,
Mar 12, 2018, 10:41:47 AM3/12/18
to TiddlyWiki
Hello,

I've made a lot of very small tiddlers (one liners)
with the tag 'testcase'

Now I want to do the following:

list the text of each tiddler
expand each tiddler into HTML (I want to see the HTML of the tiddler - pre rendering)
(similar to what is done in the HTML view of the internals plugin)

This is very helpful in understanding how TW works.

I made a start on this

<$list filter="[tag[testcase]]">
<$transclude <<currentTiddler>> />
</$list>

Somehow I need to get the
text content (the stuff I edit) from <<currentTiddler>>
<$transclude ..> goes one step too far - it renders the
result - I want to see the HTML pre rendered.


Even better if I could dump the results into a file

Cheers

/Joe

Jed Carty

unread,
Mar 12, 2018, 11:03:24 AM3/12/18
to TiddlyWiki
Dumping it into a file would take something else (although you can export tiddlers in various formats so that may help), but to get the raw text you can use the text widget like this probably overly complex example:


<$list filter="[tag[testcase]]">


!!The tiddler tiddler <$view field='title'/>

has the
text

---

<pre>
<$text text={{!!text}}/>
</pre>

---

which is is rendered as

---

<$transclude mode=block/>

---

</$list>

Xavier Cazin

unread,
Mar 12, 2018, 11:15:34 AM3/12/18
to tiddl...@googlegroups.com
Hi Joe,

if you want Jed's code to display HTML instead of wikitext, you may use the format attribute of the View widget:

<$list filter="[tag[Widgets]]">



!!The tiddler tiddler <$view field='title'/>

has the text

---

<pre>
<$view format="htmlwikified" mode="block"/>

</pre>
---

which is is rendered as

---

<$transclude mode=block/>

---


Or perform all transclusions first in a tiddler, then view the result as html, using the View widget.

Xavier.

-- Xavier Cazin

--
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 tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0b35c9aa-f253-4d44-a246-28196e7ab749%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Joe Armstrong

unread,
Mar 12, 2018, 6:13:40 PM3/12/18
to TiddlyWiki
Brilliant

Thanks

/Joe
Reply all
Reply to author
Forward
Message has been deleted
0 new messages