2013-12-05 16:21:10 +00:00
|
|
|
created: 20131205161051792
|
2014-01-20 17:14:38 +00:00
|
|
|
modified: 20140120171407764
|
2014-09-11 08:15:58 +00:00
|
|
|
tags: WikiText
|
2013-12-05 16:21:10 +00:00
|
|
|
title: Typed Blocks in WikiText
|
|
|
|
type: text/vnd.tiddlywiki
|
2014-09-11 08:15:58 +00:00
|
|
|
caption: Typed Blocks
|
2012-04-30 11:23:03 +00:00
|
|
|
|
2012-06-10 16:48:23 +00:00
|
|
|
WikiText can include blocks of text that are rendered with an explicit ContentType like this:
|
2012-06-04 11:25:54 +00:00
|
|
|
|
2012-12-29 22:29:32 +00:00
|
|
|
```
|
2014-01-20 17:14:38 +00:00
|
|
|
$$$image/svg+xml
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100">
|
|
|
|
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="green" />
|
|
|
|
</svg>
|
2012-04-30 11:23:03 +00:00
|
|
|
$$$
|
2012-12-29 22:29:32 +00:00
|
|
|
```
|
2012-06-04 11:25:54 +00:00
|
|
|
|
2012-04-30 11:23:03 +00:00
|
|
|
This renders as:
|
|
|
|
|
2014-01-20 17:14:38 +00:00
|
|
|
$$$image/svg+xml
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100">
|
|
|
|
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="green" />
|
|
|
|
</svg>
|
2012-04-30 11:23:03 +00:00
|
|
|
$$$
|
|
|
|
|
2012-06-10 16:48:23 +00:00
|
|
|
It is also possible to abbreviate the ContentType to a file extension. For example:
|
2012-04-30 11:23:03 +00:00
|
|
|
|
2012-12-29 22:29:32 +00:00
|
|
|
```
|
2012-04-30 11:23:03 +00:00
|
|
|
$$$.svg
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100">
|
|
|
|
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red" />
|
|
|
|
</svg>
|
|
|
|
$$$
|
2012-12-29 22:29:32 +00:00
|
|
|
```
|
2012-04-30 11:23:03 +00:00
|
|
|
|
|
|
|
This renders as:
|
|
|
|
|
|
|
|
$$$.svg
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100">
|
|
|
|
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red" />
|
|
|
|
</svg>
|
|
|
|
$$$
|
|
|
|
|
|
|
|
Unknown types render as plain text:
|
2012-06-04 11:25:54 +00:00
|
|
|
|
2012-12-29 22:29:32 +00:00
|
|
|
```
|
2012-04-30 11:23:03 +00:00
|
|
|
$$$text/unknown
|
|
|
|
Some plain text, which will not be //formatted//.
|
|
|
|
$$$
|
2012-12-29 22:29:32 +00:00
|
|
|
```
|
2012-06-04 11:25:54 +00:00
|
|
|
|
2012-04-30 11:23:03 +00:00
|
|
|
Which renders as:
|
2012-06-04 11:25:54 +00:00
|
|
|
|
2012-04-30 11:23:03 +00:00
|
|
|
$$$text/unknown
|
|
|
|
Some plain text, which will not be //formatted//.
|
|
|
|
$$$
|
2012-12-29 22:29:32 +00:00
|
|
|
|
|
|
|
A render type can also be specified, causing a particular text rendering to be displayed. For example:
|
|
|
|
|
|
|
|
```
|
|
|
|
$$$text/vnd.tiddlywiki>text/html
|
|
|
|
This is ''some'' wikitext
|
|
|
|
$$$
|
|
|
|
|
|
|
|
$$$text/vnd.tiddlywiki>text/plain
|
|
|
|
This is ''some'' wikitext
|
|
|
|
$$$
|
|
|
|
```
|
|
|
|
|
|
|
|
Renders as:
|
|
|
|
|
|
|
|
$$$text/vnd.tiddlywiki>text/html
|
|
|
|
This is ''some'' wikitext
|
|
|
|
$$$
|
|
|
|
|
|
|
|
$$$text/vnd.tiddlywiki>text/plain
|
|
|
|
This is ''some'' wikitext
|
|
|
|
$$$
|