mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 09:50:27 +00:00
Update Typed Blocks documentation
This commit is contained in:
parent
e9ae8d2015
commit
b9b1b001da
@ -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:
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user