mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-02 06:22:46 +00:00
34 lines
740 B
Plaintext
34 lines
740 B
Plaintext
title: TypedBlockTests
|
|
|
|
WikiText can include blocks of text that are rendered with an explicit MIME type like this:
|
|
{{{
|
|
$$$application/javascript
|
|
//This is some JavaScript
|
|
return 2 + "one";
|
|
$$$
|
|
}}}
|
|
This renders as:
|
|
|
|
$$$application/javascript
|
|
//This is some JavaScript
|
|
return 2 + "one";
|
|
$$$
|
|
|
|
It is also possible to abbreviate the MIME type to a file extension. For example:
|
|
|
|
{{{
|
|
$$$.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>
|
|
$$$
|
|
}}}
|
|
|
|
This renders as:
|
|
|
|
$$$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="red" />
|
|
</svg>
|
|
$$$
|