mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-19 02:39:42 +00:00
79 lines
1.8 KiB
Plaintext
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 ::
|
||
|
|
||
|
$$$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 :
|
||
|
|
||
|
```
|
||
|
$$$.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 :
|
||
|
|
||
|
$$$.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 :
|
||
|
|
||
|
```
|
||
|
$$$text/unknown
|
||
|
Du texte brut, qui ne sera pas //mis en forme//.
|
||
|
$$$
|
||
|
```
|
||
|
|
||
|
Ce qui affichera :
|
||
|
|
||
|
$$$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 :
|
||
|
|
||
|
```
|
||
|
$$$text/vnd.tiddlywiki>text/html
|
||
|
Ceci est un ''peu'' de wikitext
|
||
|
$$$
|
||
|
|
||
|
$$$text/vnd.tiddlywiki>text/plain
|
||
|
Ceci est un ''peu'' de wikitext
|
||
|
$$$
|
||
|
```
|
||
|
|
||
|
Afficheront respectivement :
|
||
|
|
||
|
$$$text/vnd.tiddlywiki>text/html
|
||
|
Ceci est un ''peu'' de wikitext
|
||
|
$$$
|
||
|
|
||
|
$$$text/vnd.tiddlywiki>text/plain
|
||
|
Ceci est un ''peu'' de wikitext
|
||
|
$$$
|