<!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>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
<script>
function moisrex(){
document.getElementById('source').value=document.getElementById('editor').innerHTML;
}
function moisrex2(){
document.getElementById('editor').innerHTML=document.getElementById('source').value;
}
function moisrex3(){
document.getElementById('source').value="";
}
</script>
</head>
<body>
<br>
<textarea style="height: 200px ; width: 1000px;" onclick="moisrex2();" onkeydown="moisrex2();" onkeypress="moisrex2();" onkeyup="moisrex2();" id="source"></textarea>
<center>
<button onclick="moisrex2();" onkeydown="moisrex();" onkeysfess="moisrex();">what source</button>
<button onclick="moisrex4();">همين جوري يه دکمه ي اضافي است، جهت کار بر روي آن</button>
<button type="reset" onclick="moisrex3()">پاک کردن</button>
</center>
<div onclick="moisrex();" onkeydown="moisrex();" onkeypress="moisrex();" onkeyup="moisrex();" style="border:1px #ccc soild;border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;-mz-border-radius:5px;-webkit-border-radius:5px;khtml-border-radius:5px;padding:10px;margin:20px;" id="editor" contenteditable="true"></div>
</body>
</html>