Projet

Général

Profil

Syntaxe » Historique » Version 2

Eric Seigne, 13/05/2020 16:42

1 1 Eric Seigne
# Syntaxe markdown ++
2
3
On implémente l'idée détaillée sur https://github.com/brikis98/wmd
4 2 Eric Seigne
5
### Text fields
6
7
    name = ___
8
9
```html
10
<label for="name">Name:</label> 
11
<input type="text" id="name" name="name" size="20"/>
12
```
13
14
Or:
15
16
    name = ___[50]
17
	
18
```html
19
<label for="name">Name:</label> 
20
<input type="text" id="name" name="name" size="50"/>
21
```
22
23
Exactly 3 underscores will be matched.  Any more will be handled as standard underline directives.  Default input size is 20.
24
25
26
### Radio buttons
27
28
    sex = (x) male () female
29
30
```html
31
<label>Sex:</label> 
32
<input type="radio" name="sex" id="male" value="male" checked="checked"/><label for="male">Male</label>
33
<input type="radio" name="sex" id="female" value="female"/><label for="female">Female</label>  
34
```
35
36
### Check boxes
37
38
    phones = [] Android [x] iPhone [x] Blackberry
39
40
```html
41
<label>Phones:</label> 
42
<input type="checkbox" name="phones" id="Android" value="Android"/><label for="Android">Android</label>
43
<input type="checkbox" name="phones" id="iPhone" value="iPhone" checked="checked"/><label for="iPhone">iPhone</label>
44
<input type="checkbox" name="phones" id="Blackberry" value="Blackberry" checked="checked"/><label for="Blackberry">Blackberry</label>
45
```
46
47
### Drop down
48
49
    city = {BOS, SFO, (NYC)}
50
51
```html
52
<label for="city">City:</label>
53
<select id="city" name="city">
54
  <option value="BOS">BOS</option>
55
  <option value="SFO">SFO</option>
56
  <option value="NYC" selected="selected">NYC</option>
57
</select>
58
```
59
60
Or with user-friendly labels:
61
62
    city = {BOS -> Boston, SFO -> San Francisco, (NYC -> New York City)}
63
64
```html
65
<label for="city">City:</label>
66
<select id="city" name="city">
67
  <option value="BOS">Boston</option>
68
  <option value="SFO">San Francisco</option>
69
  <option value="NYC" selected="selected">New York City</option>
70
</select>
71
```
72
73
Or both:
74
75
    city = {BOS, SFO, (NYC -> New York City)}
76
	
77
```html
78
<label for="city">City:</label>
79
<select id="city" name="city">
80
  <option value="BOS">BOS</option>
81
  <option value="SFO">SFO</option>
82
  <option value="NYC" selected="selected">New York City</option>
83
</select>
84
```
85
86
### Required fields
87
88
    zip code* = ___
89
90
```html
91
<label for="zip-code" class="required-label">Zip code*:</label>
92
<input type="text" name="zip-code" id="zip-code" size="20" class="required-input"/>
93
```
94
95
    zip code* = ___[50]
96
97
```html
98
<label for="zip-code" class="required-label">Zip code*:</label>
99
<input type="text" name="zip-code" id="zip-code" size="50" class="required-input"/>
100
```
Go to top
Ajouter une image à partir du presse-papier (Taille maximale: 50 Mo)