mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 18:00:26 +00:00
Update Typed Blocks documentation
This commit is contained in:
parent
e9ae8d2015
commit
b9b1b001da
@ -1,5 +1,5 @@
|
|||||||
created: 20131205161051792
|
created: 20131205161051792
|
||||||
modified: 20131205161130352
|
modified: 20140120171407764
|
||||||
tags: wikitext
|
tags: wikitext
|
||||||
title: Typed Blocks in WikiText
|
title: Typed Blocks in WikiText
|
||||||
type: text/vnd.tiddlywiki
|
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:
|
WikiText can include blocks of text that are rendered with an explicit ContentType like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
$$$application/javascript
|
$$$image/svg+xml
|
||||||
//This is some JavaScript
|
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100">
|
||||||
var thing = 2 + "one";
|
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="green" />
|
||||||
|
</svg>
|
||||||
$$$
|
$$$
|
||||||
```
|
```
|
||||||
|
|
||||||
This renders as:
|
This renders as:
|
||||||
|
|
||||||
$$$application/javascript
|
$$$image/svg+xml
|
||||||
//This is some JavaScript
|
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="100">
|
||||||
var thing = 2 + "one";
|
<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:
|
It is also possible to abbreviate the ContentType to a file extension. For example:
|
||||||
@ -38,20 +40,6 @@ $$$.svg
|
|||||||
</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:
|
Unknown types render as plain text:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user