mark / index.html
Docfile's picture
Update index.html
ed14eea verified
raw
history blame
767 Bytes
<!DOCTYPE html>
<html>
<head>
<title>Convertisseur Markdown</title>
<style>
.container {
display: flex;
}
textarea, #preview {
width: 50%;
height: 300px;
padding: 10px;
}
</style>
</head>
<body>
<h1>Convertisseur Markdown</h1>
<div class="container">
<textarea id="markdown-input"></textarea>
<div id="preview"></div>
</div>
<button onclick="convertir()">Convertir</button>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script>
function convertir() {
var markdownText = document.getElementById("markdown-input").value;
var html = marked.parse(markdownText);
document.getElementById("preview").innerHTML = html;
}
</script>
</body>
</html>