Is there an english high level description of how wiki text ends up as HTML?

153 views
Skip to first unread message

joearms

unread,
Dec 9, 2018, 8:12:06 AM12/9/18
to TiddlyWikiDev
I'd like an overview of how wikitext ends up as HTML

1) macros are expanded
....

?) html is output

or is it

1) wikitext is parsed
 ....

etc.

I have no idea - is this documented somewhere?

In particular, how is the interaction with 'magically named tiddlers' managed.

I am aware that giving tiddlers special names and special tags changes what happens
when the tiddler wikitext is expanded - but I have never found an exhaustive list
of the magic tiddlers and magic tags and what they do and in particular when they do what they do.

Is there such a list?

Cheers

/Joe

coda coder

unread,
Dec 9, 2018, 8:56:38 AM12/9/18
to TiddlyWikiDev
You might take a look in here...

TonyM

unread,
Dec 13, 2018, 7:35:56 PM12/13/18
to TiddlyWikiDev
Joearms,

I am not sure how important it is for you to learn how the wiki text is translated to HTML, more that "what WikiText results in what output?" Please clarify!

One thing to keep in mind is exploring your TiddlyWiki's own internal workings is a great way to learn and discover. In part due to TiddlyWiki's Open source status and in part because it is designed to allow its user interface and working to be freely modified you can actually be on a desert island with no internet and teach yourself about tiddlywiki. Of course this can sometimes be time consuming when some good documentation would help.

The challenge for a new user, like for any system, is getting and understanding the keywords that describe something. For example the "magic tags" you mention, are most likely system tags thus if you look here https://tiddlywiki.com/#SystemTags you will see a short explanation for each, many of these will also be the magic tiddlers you speak of.

Learning about the page, view and edit templates and how they work is also useful, because then you can track how something appears in front of you. 

The way the toolbars and buttons work is also a key area to learn, because it enables so much, including customising or making your own buttons.

I am now reworking my "TWInternals" Tiddler to remove a dependency on a plugin and I will let you know here where to find it. This tiddler basically lets you peek into a range of internal tiddlers and settings, and can act both as a reference and a step by step exploration to learn more.

Regards
Tony

@TiddlyTweeter

unread,
Dec 14, 2018, 8:52:33 AM12/14/18
to TiddlyWikiDev
TonyM 
I am not sure how important it is for you to learn how the wiki text is translated to HTML, more that "what WikiText results in what output?" Please clarify!

I'm emboldened by Joe since he knows what he is doing, which I often don't.

Its very important.

One issue is knowing when you are passing "literal text" when to what or "Wikitext" (WHAT is that, BTW?)

The  rest of your reply is interesting for basically saying: find out yourself :-)

J. x

PMario

unread,
Dec 15, 2018, 8:09:08 AM12/15/18
to TiddlyWikiDev
Hi Joe,


  • copy the following text into the new tiddler

this is some text

  • open the tiddler preview in edit mode
  • to the right of the "preview eye" icon is a second icon.
    • Chevron Down, which lets you select the preview type
    • choose parse tree
  • change the txt to

show me a link: [[HelloThere]]

  • change the text to
transclude: {{About}}

  • Now change the preview type to: widget-tree
  • Set browser zoom level to 90% or lower to see the recursive structure.
have fun!
mario


PMario

unread,
Dec 15, 2018, 8:38:00 AM12/15/18
to tiddly...@googlegroups.com
On Sunday, December 9, 2018 at 2:12:06 PM UTC+1, joearms wrote:

In particular, how is the interaction with 'magically named tiddlers' managed.

We call them templates: (list is sorted "simple" to complex)

 - ViewTemplate
 - EditTemplate
 - PageTemplate

You may guess it. ViewTemplate creates a single tiddler UI. EditTemplate creates the tiddler edit-UI. PageTemplate creates the whole page.

The basic element is the <$list> widget. The tag used to "collect" the view-template elements is $:/tags/ViewTemplate

Open $:/AdvancedSearch, select the "Shadows-tab" and search for: viewtemplate

you should get something like this (list is shortened):


If you open the ViewTemplate in edit mode you'll see some variable definitions and the most important part is:

<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list>

which basically means:

 - create a list of all shadows and normal tiddlers
 - that are tagged with $:/tags/ViewTemplate
 - exclude every tiddler, that has a draft.of field
 - store the name of the tiddler into a variable named: listItem
 
 - transclude the tiddler in the listItem  .... which "calls" the different ViewTemplate elements.

So if you would want to add your own content to every tiddler it should be done like this:

 - create a new tiddler eg: myFooter
 - tag it: $:/tags/ViewTemplate
 - add this text:

<hr>
My new footer

 - Every tiddler will have this footer now

If you dig into the ViewTemplate and understand it, the others basically work the same way.

If you want a new header, you'll have to have a look at the $:/tags/ViewTemplate list field.

have fun!
mario


PMario

unread,
Dec 15, 2018, 8:46:01 AM12/15/18
to TiddlyWikiDev
previous post modified:

If you want a new header, you'll have to have a look at the $:/tags/ViewTemplate list field.

-m

TonyM

unread,
Dec 16, 2018, 8:48:52 PM12/16/18
to TiddlyWikiDev
Josiah,

I think your comment is little unfair. I listed the key components to learning what Joe wanted, ultimately supported by the content that Mario was able to post.
Sometimes such broad questions can not reasonably be fully answered, hence my request for more info, and some guidance towards the answer.

Also my answer came 4 days after the question, and in a substantially more detail than Coda Coder

In fact for such broad questions, soften the answer can only be found by taking a journey.

Regards
Tony

joearms

unread,
Dec 17, 2018, 7:39:55 AM12/17/18
to TiddlyWikiDev
Thank you, more to poke around in :-)


One thing that is unclear to me
can I have many tiddlers with the '$:/tags/ViewTemplate' tag or only one???

If there are several in which order are the rules applied?

Cheers

/Joe

PMario

unread,
Dec 17, 2018, 8:43:41 AM12/17/18
to TiddlyWikiDev
On Monday, December 17, 2018 at 1:39:55 PM UTC+1, joearms wrote:
Thank you, more to poke around in :-)

you are welcome
 
One thing that is unclear to me
can I have many tiddlers with the '$:/tags/ViewTemplate' tag or only one???

You can have several. See the list from the last post.
 
If there are several in which order are the rules applied?

The tag tiddler contains a magic field called list: see: $:/tags/ViewTemplate  open in edit mode and you'll see the order.

----------- Backup Backup Backup -------------

Try this code: <<list-links-draggable tiddler:"$:/tags/ViewTemplate">> which gives you a draggable list. You can mess up your ViewTemplate.

If you want to reset, just delete the $:/tags/ViewTemplate tiddler and the core setting will take over again :)

have fun!
mario

PMario

unread,
Dec 17, 2018, 8:44:42 AM12/17/18
to TiddlyWikiDev
Missing link about the list-field: https://tiddlywiki.com/#ListField :)
-m

@TiddlyTweeter

unread,
Dec 18, 2018, 8:20:26 AM12/18/18
to TiddlyWikiDev
Caro, you are right. Apologies.

I will post separately about my issue on this.

J.  
Reply all
Reply to author
Forward
0 new messages