Código:
Ota cosa que nescesito es saber como saber el texto seleccionado <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>WYSIWYG</title>
<script type="text/javascript">
function escriure(key)
{
if (document.all)
{
var keynum = key.keyCode;
}
else
{
var keynum = key.which;
}
keytext = String.fromCharCode(keynum);
wysiwyg = document.getElementById('wysiwyg');
wysiwyg.innerHTML = wysiwyg.innerHTML + keytext;
}
</script>
</head>
<body onkeypress="escriure(event)">
<div id="wysiwyg"></div>
</body>
</html>

