-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
100 lines (64 loc) · 2.91 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Code Editor</title>
<h1 class="head">Code Editor</h1>
</head>
<link rel="stylesheet" href="style.css" />
<body>
<div class="main">
<div class="codePart">
<h6 class="h1"><img width="24" height="24" src="https://img.icons8.com/color/48/html-5--v1.png"
alt="html-5--v1" />HTML</h6>
<button class="btn" onclick="myFunctionHtml()">Copy text</button>
<textarea id="html" placeholder="HTML"></textarea>
<script> function myFunctionHtml() {
// Get the text field
var copyText = document.getElementById("html");
// Select the text field
copyText.select();
// Copy the text inside the text field
navigator.clipboard.writeText(copyText.value);
// Alert the copied text
} </script>
</div>
<div class="codePart">
<h6 class="h1"><img width="24" height="24" src="https://img.icons8.com/color/24/css3.png" alt="css3" />CSS
</h6>
<button class="btn" onclick="myFunctionCss()">Copy text</button>
<textarea id="css" placeholder="CSS"></textarea>
<script> function myFunctionCss() {
// Get the text field
var copyText = document.getElementById("css");
// Select the text field
copyText.select();
// Copy the text inside the text field
navigator.clipboard.writeText(copyText.value);
// Alert the copied text
} </script>
</div>
<div class="codePart">
<h6 class="h1"> <img width="24" height="24" src="https://img.icons8.com/color/24/javascript--v1.png"
alt="javascript--v1" />JavaScript</h6>
<button class="btn" onclick="myFunctionJs()">Copy text</button>
<textarea id="JavaScript" placeholder="JavaScript"></textarea>
<script> function myFunctionJs() {
// Get the text field
var copyText = document.getElementById("JavaScript");
// Select the text field
copyText.select();
// Copy the text inside the text field
navigator.clipboard.writeText(copyText.value);
// Alert the copied text
} </script>
</div>
</div>
<div class="output">
<h1 class="h2">OUTPUT</h1>
<iframe id="code"></iframe>
</div>
<script type="text/JavaScript" src="app.js"></script>
</body>
</html>