-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
54 lines (51 loc) · 2.4 KB
/
Copy pathindex.html
File metadata and controls
54 lines (51 loc) · 2.4 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Set character set and viewport for responsiveness -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Set the title of the page -->
<title>Code Editor</title>
<!-- Include Monaco Editor CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/monaco-editor@0.29.0/min/vs/editor/editor.main.css">
<!-- Include custom styles -->
<link rel="stylesheet" href="styles.css">
</head>
<body>
<!-- Main container for the code editor -->
<div id="editor-container">
<!-- Controls section for various editor functions -->
<div class="editor-controls">
<!-- Button to export code -->
<button onclick="exportCode()">Export Code</button>
<!-- Input element for importing code from a file (hidden by default) -->
<input type="file" id="importInput" style="display: none;" />
<!-- Button to import code -->
<button onclick="importCode()">Import Code</button>
<!-- Dropdown for selecting the programming language -->
<label for="languageSelect">Select Language:</label>
<select id="languageSelect" onchange="changeEditor()">
<option value="cpp">C++</option>
<option value="csharp">C#</option>
<option value="javascript">JavaScript</option>
<option value="python">Python</option>
</select>
<!-- Dropdown for selecting the theme -->
<label for="themeSelect">Select Theme:</label>
<select id="themeSelect" onchange="changeTheme()">
<option value="vs-dark">Dark</option>
<option value="vs">Light</option>
</select>
<!-- Checkbox to toggle line numbers -->
<label for="lineNumbersCheckbox">Show Line Numbers:</label>
<input type="checkbox" id="lineNumbersCheckbox" onchange="toggleLineNumbers()">
</div>
<!-- Container for the Monaco Editor -->
<div id="editor" class="language-editor"></div>
</div>
<!-- Include Monaco Editor loader script -->
<script src="https://cdn.jsdelivr.net/npm/monaco-editor@0.29.0/min/vs/loader.js"></script>
<!-- Include custom script -->
<script src="script.js"></script>
</body>
</html>