Update Typed Blocks documentation

print-window-tiddler
Jermolene 2014-01-20 17:14:38 +00:00
rodzic e9ae8d2015
commit b9b1b001da
1 zmienionych plików z 9 dodań i 21 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
created: 20131205161051792
modified: 20131205161130352
modified: 20140120171407764
tags: wikitext
title: Typed Blocks in WikiText
type: text/vnd.tiddlywiki
@ -7,17 +7,19 @@ 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";
$$$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>
$$$
```
This renders as:
$$$application/javascript
//This is some JavaScript
var thing = 2 + "one";
$$$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>
$$$
It is also possible to abbreviate the ContentType to a file extension. For example:
@ -38,20 +40,6 @@ $$$.svg
</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:
```