caption: Typed Blocks
created: 20131205161051792
modified: 20251006150732150
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:

!! Image SVG

<<wikitext-example-without-html 
"""$$$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:

<<wikitext-example-without-html
"""$$$.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>
$$$
"""
>>

!! Unknown Type

Unknown types render as plain text

<<wikitext-example-without-html 
"""$$$text/unknown
Some plain text, which will not be //formatted//.
$$$
""">>

!! Specific Type WikiText

A render type can also be specified, causing a particular text rendering to be displayed. For example:

<<wikitext-example-without-html 
"""$$$text/vnd.tiddlywiki>text/html
This is ''some'' wikitext
$$$
""">>

<<wikitext-example-without-html 
"""$$$text/vnd.tiddlywiki>text/plain
This is ''some'' wikitext
$$$
""">>

!! CSV Table

<<wikitext-example-without-html 
"""$$$text/csv
a,b,c
1,2,3
4,5,6
aye,bee,cee
10,22,42
$$$
""">>
