1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 01:57:19 +00:00

Docs tweaks

This commit is contained in:
Jermolene 2014-10-18 19:15:04 +01:00
parent 3305874235
commit 9a4bda9c85
2 changed files with 14 additions and 15 deletions

View File

@ -1,5 +1,5 @@
created: 20131205160816081
modified: 20140619111725471
modified: 20141018181414011
tags: WikiText
title: HTML in WikiText
type: text/vnd.tiddlywiki
@ -14,9 +14,13 @@ This is my nice and simple block of text. HelloThere
</article>
```
! Content Parsing
The content of an HTML element will be parsed in inline mode unless the opening tag is followed by two linebreaks, in which case it is parsed in block mode. (Inline mode means that block mode formatting such as tables, lists and headings is not recognised).
! Attributes
Attributes in HTML tags can be specified as a transclusion or a macro invocation. For example, here the value of the `href` attribute will be set to the value of the tiddler MyLinkDestination:
Attributes in HTML tags can be specified as a literal, a transclusion or a macro invocation. For example, here the value of the `href` attribute will be set to the value of the tiddler MyLinkDestination:
```
<a href={{MyLinkDestination}}>link</a>
@ -45,8 +49,3 @@ By using triple-double quotes you can specify attribute values that include sing
Rodentville,
Ratland."""/>
```
! Content Parsing
The content of an HTML element will be parsed in inline mode unless the opening tag is followed by two linebreaks. (Inline mode means that block mode formatting such as tables, lists and headings is not recognised).

View File

@ -1,19 +1,19 @@
caption: Variables, Parameters, Subsitutions
caption: Variables, Parameters, Substitutions
created: 20141018090608643
modified: 20141018104201050
modified: 20141018181414011
tags: WikiText
title: Variables, Macros and Subsitutions in WikiText
title: Variables, Macros and Substitutions in WikiText
type: text/vnd.tiddlywiki
! Syntax for Attributes
The syntax for the attributes of [[HTML elements|HTML in WikiText]] and [[widgets|Widgets in WikiText]]:
* `"text"` or `'text'` - passed as a literal value
* `"text"`, `'text'`, `"""text"""` - passed as a literal value
* `{{text reference}}` - [[transcludes|Transclusion in WikiText]] a text reference
* `<<macro>>` - transcludes a variable or macro invocation.
* `<<macro>>` - transcludes a variable or macro invocation
! Syntax for Filter
! Syntax for Filters
Using single brace `{...}` and `<...>` when referenced as operands in [[Filter expression|Introduction to Filters]].
@ -26,7 +26,7 @@ Using single brace `{...}` and `<...>` when referenced as operands in [[Filter e
! Textual Substitution
* `$parametername$` - for [[macor parameters|Macros in WikiText]]
* `$parametername$` - for [[macro parameters|Macros in WikiText]]
```
\define mysamplemacro(name:"Bugs Bunny",address:"Rabbit Hole Hill")
Hi, I'm $name$ and I live in $address$
@ -44,7 +44,7 @@ Hi, I'm $(name)$ and I live in $(address)$
<<mysamplemacro2>>
</$set></$set>
```
The differents between textual substitution and other syntax:
The difference between textual substitution and other syntax:
* Textual substitution is performed before the macro is parsed, the values are inserted into the target.
* While the `<<...>>` syntax is a transclusion, where the "WikiText" is inserted and rendered separately.