Showing the text field as it appears in Edit

77 views
Skip to first unread message

TonyM

unread,
Jan 3, 2019, 1:54:20 AM1/3/19
to TiddlyWiki
Folks,

I want to include the content of another tiddlers text field however with it in block mode, ie not doing what wikification does and put the following on the one line

First line
2nd Line

<$transclude mode="block"/>
and
<$view field="text" format="text" />

Currently displays as

First line2nd Line

Basically I want the equivalent of wrapping the text field in triple quotes or triple back ticks but displayed as plain text.

Background;
I am creating a tiddler view that presents tiddlers for copy and past into Google groups with title and tags, and text as it is. Could be pasted into a new tid file and work.

Regards
Tony

S. S.

unread,
Jan 3, 2019, 9:08:31 AM1/3/19
to TiddlyWiki
Would this help:

<$codeblock code={{TiddlerName}}/>

S. S.

unread,
Jan 3, 2019, 9:17:07 AM1/3/19
to TiddlyWiki

As part of my attempt at a Begginers section for Documentation on the TW website -
I use this in a tiddler named: Looking inside a tiddler
for showing how tiddlywiki stores in its HTML file a tiddler named: How a Tiddler is Stored in a TiddlyWiki file



\define .write-tiddler(title, caption, created, modified, tags, type, text)
<$codeblock code="""<div caption="$(caption)$" created="$(created)$" modified="$(modified)$" tags="$(tags)$" title="$(title)$" type="$(type)$">
<pre>$(text)$</pre>
</div>
"""
/>
\end

\define .write-values(title)
<$vars title="""$title$""" caption={{$title$!!caption}} created={{$title$!!created}} modified={{$title$!!modified}} tags={{$title$!!tags}} type={{$title$!!type}} text={{$title$!!text}}>
<$macrocall $name=".write-tiddler"/>
</$vars>
\end

Below is how the  tiddler : [[How a Tiddler is Stored in a TiddlyWiki file]] : is stored in this ~TiddlyWiki's html file:

<<.write-values title:"""How a Tiddler is Stored in a TiddlyWiki file""">>

Hope that helps.

Brian Theado

unread,
Jan 3, 2019, 5:50:35 PM1/3/19
to tiddl...@googlegroups.com
Tony,

This seems to work:

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

Brian

--
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+...@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/7e08011a-76ad-4663-a181-cc9f2a3c5189%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

TonyM

unread,
Jan 3, 2019, 7:00:37 PM1/3/19
to TiddlyWiki
Brian and S S

Both your solutions work, thanks. I must have had an imagination lock yesterday. codeblock was all together new to me.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages