This page is part of a static HTML representation of the TiddlyWiki at http://tiddlywiki.com/

HTML in WikiText

22nd June 2016 at 12:22pm

HTML tags and comments can be used directly in WikiText. For example:

<article class="hello">
This is my nice and simple block of text. HelloThere
<!-- This comment will not appear in the wikified output -->
</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 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}} rel="noopener noreferrer">link</a>

Note that the link should have the rel attribute set to noopener noreferrer to maintain privacy of the URLs of private TiddlyWiki's (eg on Dropbox). See https://mathiasbynens.github.io/rel-noopener/ for more information.

Here an attribute is specified as a macro invocation:

<a href=<<MyMacro "Brian">> rel="noopener noreferrer">link</a>

Literal attribute values can include line breaks. For example:

<div data-address="Mouse House,
Mouse Lane,
Rodentville,
Ratland."/>

By using triple-double quotes you can specify attribute values that include single double quotes. For example:

<div data-address="""Mouse House,
"Mouse" Lane,
Rodentville,
Ratland."""/>