1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Page sans titre</title>
</head>
<body>
<script language="jscript" type="text/javascript">
function bbcode(bbdebut, bbfin){
var input = window.document.redaction_administration.textarea;
input.focus();
/* pour IE (toujous un cas appart lui )*/
if(typeof document.selection != 'undefined'){
var str = document.selection.createRange().text;
input.focus();
var sel = document.selection.createRange();
if(str == ""){
sel.text = sel.text + bbdebut + bbfin;
sel.moveStart("character", -bbfin.length);
sel.moveEnd("character", -bbfin.length);
sel.select();
}
else
sel.text = bbdebut + sel.text + bbfin;
}
/* pour les autres navigateurs comme Netscape... */
else{
var pos;
var re = new RegExp('^[0-9]{0,3}$');
while(!re.test(pos)) pos = prompt("insertion (0.." + input.value.length + ";):", "0");
if(pos > input.value.length) pos = input.value.length;
var insText = prompt("Veuillez taper le texte");
input.value = input.value.substr(0, pos) + bbdebut + insText + bbfin + input.value.substr(pos);
}
}
function smileys(img)
{
window.document.redaction_administration.textarea.value += '' + img + '';
}
</script>
<div>
<div onclick="javascript:bbcode('[gras]', '[/gras]');return(false)"></div>
<div onclick="javascript:bbcode('[italic]', '[/italic]');return(false)"></div>
<div onclick="javascript:bbcode('[underline]', '[/underline]');return(false)"></div>
</div>
<div>
<div onclick="javascript:bbcode('[gauche]', '[/gauche]');return(false)"></div>
<div onclick="javascript:bbcode('[centre]', '[/centre]');return(false)"></div>
<div onclick="javascript:bbcode('[droite]', '[/droite]');return(false)"></div>
<div onclick="javascript:bbcode('[justifie]', '[/justifie]');return(false)"></div>
</div>
<div>
<div onclick="javascript:code();return(false)"></div>
<div onclick="javascript:code2();return(false)"></div>
</div>
<select name="couleur">
<option selected="selected">Couleur</option>
<option value="rouge" onclick="javascript:bbcode('[rouge]', '[/rouge]');return(false)">rouge</option>
<option value="bleu" onclick="javascript:bbcode('[bleu]', '[/bleu]');return(false)">bleu</option>
</select>
<select name="taille_texte" class="taille_texte">
<option selected="selected">Taille du texte</option>
<option value="petit" onclick="javascript:bbcode('[taille=petit]', '[/taille]');return(false)">Petit</option>
<option value="grand" onclick="javascript:bbcode('[taille=grand]', '[/taille]');return(false)">Grand</option>
</select>
</body>
</html> |
Partager