
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
}
.container {
display: flex;
height: 100vh;
}
.editor {
flex: 1;
padding: 20px;
background-color: #f1f1f1;
}
.preview {
flex: 1;
padding: 20px;
background-color: #fff;
border-left: 1px solid #ccc;
overflow-y: auto;
}
textarea {
width: 100%;
height: calc(100vh - 40px);
padding: 10px;
font-size: 14px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
resize: none;
}
const codeTextarea = document.getElementById('code');
const...