-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
58 lines (57 loc) · 1.42 KB
/
index.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
<!DOCTYPE html>
<!--Made with ❤️ by Al Pemartin-->
<html class="no-js lt-ie9 lt-ie8 lt-ie7">
<html class="no-js lt-ie9 lt-ie8">
<html class="no-js lt-ie9">
<html class="no-js">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="A real Time Code Editor for HTML, CSS and JS">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@500&display=swap" rel="stylesheet">
<title>Real Time Editor</title>
<script>
function refresh(){
var textContent = document.getElementById('editor-textarea').value;
document.getElementById('viewer').srcdoc = textContent;
}
</script>
<style>
* {
margin: 0;
padding: 0;
}
.main {
background: #bdc3c7;
width: 100%;
height: 100%;
display: inline-flex;
}
#editor-textarea {
height: 95%;
width: 100%;
margin: 10px;
padding: 5px;
}
#viewer {
background: #fff;
border: none;
width: 100%;
height: 95%;
margin: 10px;
border: 1px solid #3498db;
}
</style>
</head>
<body>
<h1>Made with ❤️ by Al Pemartin</h1>
<div class="main">
<textarea id="editor-textarea" onkeyup="refresh()"></textarea>
<iframe id="viewer"></iframe>
</div>
</body>
</html>