2024-09-10 16:00:43 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Edit Content</title>
|
|
|
|
<style>
|
2024-09-10 19:41:49 +02:00
|
|
|
body {
|
|
|
|
font-family: Arial, sans-serif;
|
|
|
|
line-height: 1.6;
|
|
|
|
margin: 0;
|
|
|
|
padding: 20px;
|
|
|
|
background-color: #1a1a1a;
|
|
|
|
color: #f0f0f0;
|
|
|
|
}
|
|
|
|
.container {
|
|
|
|
max-width: 800px;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
h1 {
|
|
|
|
color: #4CAF50;
|
|
|
|
}
|
|
|
|
#editor {
|
|
|
|
width: 100%;
|
|
|
|
height: 400px;
|
|
|
|
font-family: monospace;
|
|
|
|
font-size: 14px;
|
|
|
|
background-color: #2a2a2a;
|
|
|
|
color: #f0f0f0;
|
|
|
|
border: 1px solid #4CAF50;
|
|
|
|
padding: 10px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
input[type="submit"] {
|
|
|
|
background-color: #4CAF50;
|
|
|
|
color: white;
|
|
|
|
padding: 10px 20px;
|
|
|
|
border: none;
|
|
|
|
cursor: pointer;
|
|
|
|
font-size: 16px;
|
|
|
|
margin-top: 10px;
|
|
|
|
}
|
|
|
|
input[type="submit"]:hover {
|
|
|
|
background-color: #45a049;
|
|
|
|
}
|
2024-09-10 16:00:43 +02:00
|
|
|
</style>
|
2024-09-10 19:41:49 +02:00
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.12/ace.js"></script>
|
2024-09-10 16:00:43 +02:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
2024-09-10 19:41:49 +02:00
|
|
|
<h1>Edit Content</h1>
|
2024-09-10 16:00:43 +02:00
|
|
|
<form method="post">
|
2024-09-10 19:41:49 +02:00
|
|
|
<div id="editor">{{ content }}</div>
|
|
|
|
<input type="hidden" name="content" id="hidden-content">
|
|
|
|
<input type="submit" value="Save" onclick="updateContent()">
|
2024-09-10 16:00:43 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
2024-09-10 19:41:49 +02:00
|
|
|
<script>
|
|
|
|
var editor = ace.edit("editor");
|
|
|
|
editor.setTheme("ace/theme/monokai");
|
|
|
|
editor.session.setMode("ace/mode/text");
|
|
|
|
|
|
|
|
function updateContent() {
|
|
|
|
document.getElementById('hidden-content').value = editor.getValue();
|
|
|
|
}
|
|
|
|
</script>
|
2024-09-10 16:00:43 +02:00
|
|
|
</body>
|
|
|
|
</html>
|