<!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>
<style>
body{
background:#e7e7e9;
}
#linkdemo{
height: 34px !important;
width: 100%;
padding:8px !important;
color:#515151;
margin-top:5px;
display:none;
}
textarea{
border-radius: 3px;
border: 1px solid rgb(212, 212, 212);
padding: 10px;
margin: 0px;
background: rgb(240, 240, 240);
resize:none;
}
button{
padding: 5px;
background: rgb(240, 240, 240);
margin: 0px;
margin-right:3px;
float:right;
border-radius:4px 4px 0px 0px;
border: 1px solid rgb(212, 212, 212);
font: 11px Tahoma;
}
.number {
border: 1px solid rgb(204, 204, 204);
border-radius: 0px 0px 5px 5px;
margin: 5px;
top: -10px;
left: 30px;
color: rgb(0, 0, 0);
background: none repeat scroll left top rgb(240, 240, 240);
position: absolute;
direction: rtl;
font: 11px Tahoma;
padding: 8px;
}
</style>
<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="";
}
function setCode(code){
document.getElementById('source').value=code;
}
function moisrexmkcode(){if (document.getElementById('moisrexadres').value == ""){alert('Input youre site address');}else{document.getElementById('moisrexpreview').value = document.getElementById('moisrexadres').value + '#$$' + escape(document.getElementById('moisrexpreview').value) + '$$$';}}
var code='<input type="url" id="moisrexadres" size="50" value="www.dl52.rozblog.com" placeholder="اين آدرس را وارد کنيد: www.dl52.rozblog.com"><br><br>\n<textarea\nid="moisrexpreview" style="width:400px; height:250px; direction:rtl"\nplaceholder="کدي را که ميخواهيد از آن دمو بسازيد ا اينجا وارد کنيد"><\/textarea><br><br>\n<input type="button" value="ساخت دمو" onclick="moisrexmkcode()">';
</script>
</head>
<body>
<br>
<textarea style="height: 200px ; width: 1000px;" onclick="moisrex2();" onkeydown="moisrex2();" onkeypress="moisrex2();" onkeyup="moisrex2();" id="source"><!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Moisrex</title>
</head>
<body>
</body>
</html>
</textarea>
<center>
<button onclick="moisrex2();" onkeydown="moisrex();" onkeysfess="moisrex();">نمايش کد</button>
<button onclick="setCode(code);">ساخت لينک دمو</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>