TiddlyWiki5/editions/fr-FR/tiddlers/Typed_Blocks_in_WikiText.tid

79 lines
1.8 KiB
Plaintext

caption: Blocs typés
created: 20131205161051792
fr-title: Les blocs typés avec WikiText
modified: 20150601071506502
tags: WikiText
title: Typed Blocks in WikiText
type: text/vnd.tiddlywiki
WikiText peut inclure des blocs de textes qui seront renvoyés avec un contenu lié à leur  ContentType, comme cela :
```
$$$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>
$$$
```
Ce qui affichera&nbsp;::
$$$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>
$$$
Il est aussi possible d'abréger la déclaration du ContentType par son extension. Exemple&nbsp;:
```
$$$.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>
$$$
```
Ce qui affichera&nbsp;:
$$$.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>
$$$
Les types inconnus s'afficheront comme du texte brut&nbsp;:
```
$$$text/unknown
Du texte brut, qui ne sera pas //mis en forme//.
$$$
```
Ce qui affichera&nbsp;:
$$$text/unknown
Du texte brut, qui ne sera pas //mis en forme//.
$$$
Un rendu spécifique peut-être indiqué, déterminant l'affichage d'un rendu de texte particulier. Par exemple&nbsp;:
```
$$$text/vnd.tiddlywiki>text/html
Ceci est un ''peu'' de wikitext
$$$
$$$text/vnd.tiddlywiki>text/plain
Ceci est un ''peu'' de wikitext
$$$
```
Afficheront respectivement&nbsp;:
$$$text/vnd.tiddlywiki>text/html
Ceci est un ''peu'' de wikitext
$$$
$$$text/vnd.tiddlywiki>text/plain
Ceci est un ''peu'' de wikitext
$$$