created: 20131205161051792
modified: 20131205161130352
tags: wikitext
title: Typed Blocks in WikiText
type: text/vnd.tiddlywiki
WikiText can include blocks of text that are rendered with an explicit ContentType like this:
```
$$$application/javascript
//This is some JavaScript
var thing = 2 + "one";
$$$
```
This renders as:
$$$application/javascript
//This is some JavaScript
var thing = 2 + "one";
$$$
It is also possible to abbreviate the ContentType to a file extension. For example:
```
$$$.svg
$$$
```
This renders as:
$$$.svg
$$$
And, finally, a JSON example:
```
$$$.json
{"teapot": "brown","inside":["milk","sugar",23]}
$$$
```
Which renders as:
$$$.json
{"teapot": "brown","inside":["milk","sugar",23]}
$$$
Unknown types render as plain text:
```
$$$text/unknown
Some plain text, which will not be //formatted//.
$$$
```
Which renders as:
$$$text/unknown
Some plain text, which will not be //formatted//.
$$$
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
$$$