2015-06-01 12:58:21 +00:00
caption: Blocs typés
created: 20131205161051792
2022-04-24 20:45:06 +00:00
fr-title: Blocs typés en WikiTexte
modified: 20220422133134883
2015-06-01 12:58:21 +00:00
tags: WikiText
title: Typed Blocks in WikiText
type: text/vnd.tiddlywiki
2022-04-24 20:45:06 +00:00
Le <<fr WikiText>> peut inclure des blocs de texte qui seront interprétés selon le type de leur contenu, aussi appelé <<gf "type MIME">>. Ces blocs sont déclarés ainsi<<:>>
2015-06-01 12:58:21 +00:00
```
$$$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>
$$$
```
2022-04-24 20:45:06 +00:00
affichera ceci<<:>>
2015-06-01 12:58:21 +00:00
$$$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>
$$$
2022-04-24 20:45:06 +00:00
Il est aussi possible de remplacer la déclaration du type de contenu par l'extension de fichier correspondante. Exemple<<:>>
2015-06-01 12:58:21 +00:00
```
$$$.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>
$$$
```
2022-04-24 20:45:06 +00:00
affichera ceci<<:>>
2015-06-01 12:58:21 +00:00
$$$.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>
$$$
2022-04-24 20:45:06 +00:00
Les types inconnus s'afficheront comme du texte brut<<:>>
2015-06-01 12:58:21 +00:00
```
$$$text/unknown
Du texte brut, qui ne sera pas //mis en forme//.
$$$
```
2022-04-24 20:45:06 +00:00
affichera ceci<<:>>
2015-06-01 12:58:21 +00:00
$$$text/unknown
Du texte brut, qui ne sera pas //mis en forme//.
$$$
2022-04-24 20:45:06 +00:00
Un format de rendu peut être indiqué en complément, qui sélectionnera un format différent pour le résultat. Par exemple<<:>>
2015-06-01 12:58:21 +00:00
```
$$$text/vnd.tiddlywiki>text/html
Ceci est un ''peu'' de wikitext
$$$
2022-04-24 20:45:06 +00:00
```
et
2015-06-01 12:58:21 +00:00
2022-04-24 20:45:06 +00:00
```
2015-06-01 12:58:21 +00:00
$$$text/vnd.tiddlywiki>text/plain
Ceci est un ''peu'' de wikitext
$$$
```
2022-04-24 20:45:06 +00:00
afficheront respectivement<<:>>
2015-06-01 12:58:21 +00:00
$$$text/vnd.tiddlywiki>text/html
Ceci est un ''peu'' de wikitext
$$$
2022-04-24 20:45:06 +00:00
et<<:>>
2015-06-01 12:58:21 +00:00
$$$text/vnd.tiddlywiki>text/plain
Ceci est un ''peu'' de wikitext
$$$