-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy patheditor.html
60 lines (58 loc) · 1.46 KB
/
editor.html
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
<!DOCTYPE html>
<html>
<head>
<meta lang="en-US">
<meta charset="utf-8">
<style type="text/css">
*{margin:0;padding:0;box-sizing:border-box;}
header
{width:100%;height:100px;background-color:cyan;font-size:100px;text-align:center;font-family:Rosewood Std;margin-bottom:12px;}
fieldset
{width:35%;height:560px;border:1px solid black;float:left;margin-left:140px;padding-left:10px;}
textarea
{width:100%;height:100%;border:none;outline:none;sc}
#result
{overflow:scroll;width:100%;height:100%;}
#code
{font-size:22px;font-family:calibri;}
footer
{position:fixed;top:580px;left:45%;}
#but
{border:none;background-color:#FF4E00;height:40px;width:150px;color:white;font-size:20px;font-family:cursive;border-radius:7px;cursor:pointer;outline:none;}
</style>
</head>
<body>
<header>TEXT EDITOR</header>
<p style="position:absolute;color:violet;top:80px;right:0;">Developed by: Keshav Singh</p>
<fieldset>
<legend>Type Code Here</legend>
<textarea id="code">
<!DOCTYPE html>
<html>
<head>
<meta lang="en-US">
<meta charset="utf-8">
</head>
<body>
<h1>Your code is here...</h1>
</body>
</html>
</textarea>
</fieldset>
<fieldset>
<legend>Code Result</legend>
<div id="result">
</div>
</fieldset>
<footer>
<button id="but">Run Code Now!</button>
</footer>
<script type="text/javascript">
var z=document.getElementById("but");
z.onclick=function()
{ var x=document.getElementById("code").value;
var y=document.getElementById("result");
y.innerHTML=x;
}
</script>
</body>