-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
41 lines (38 loc) · 1.2 KB
/
Copy pathindex.html
File metadata and controls
41 lines (38 loc) · 1.2 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
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Appunti</title>
<!-- Favicon -->
<link rel="icon" href="favicon-32x32.png" type="image/png">
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background-color: white;
color: black;
font-family: Arial, sans-serif;
height: 100vh;
overflow: auto;
border: 1px solid #ccc;
padding: 20px;
}
</style>
</head>
<body contenteditable="true" id="editor">
<script>
// Carica il contenuto salvato nel localStorage quando la pagina viene caricata
window.onload = function() {
document.getElementById('editor').innerHTML = localStorage.getItem('savedContent') || "";
};
// Salva il contenuto ogni volta che l'utente modifica qualcosa
document.getElementById('editor').addEventListener("input", function() {
localStorage.setItem('savedContent', document.getElementById('editor').innerHTML);
});
</script>
</body>
</html>