Update index.html
Browse files- index.html +9 -17
index.html
CHANGED
|
@@ -3,35 +3,27 @@
|
|
| 3 |
<head>
|
| 4 |
<title>Convertisseur Markdown</title>
|
| 5 |
<style>
|
| 6 |
-
|
| 7 |
-
|
| 8 |
}
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
height: 300px;
|
| 12 |
-
padding: 10px;
|
| 13 |
}
|
| 14 |
</style>
|
|
|
|
| 15 |
</head>
|
| 16 |
<body>
|
| 17 |
-
|
| 18 |
<h1>Convertisseur Markdown</h1>
|
| 19 |
-
|
| 20 |
-
<div class="container">
|
| 21 |
-
<textarea id="markdown-input"></textarea>
|
| 22 |
-
<div id="preview"></div>
|
| 23 |
-
</div>
|
| 24 |
-
|
| 25 |
<button onclick="convertir()">Convertir</button>
|
|
|
|
| 26 |
|
| 27 |
-
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
| 28 |
<script>
|
| 29 |
function convertir() {
|
| 30 |
-
var markdownText = document.getElementById(
|
| 31 |
var html = marked.parse(markdownText);
|
| 32 |
-
document.getElementById(
|
| 33 |
}
|
| 34 |
</script>
|
| 35 |
-
|
| 36 |
</body>
|
| 37 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<title>Convertisseur Markdown</title>
|
| 5 |
<style>
|
| 6 |
+
table {
|
| 7 |
+
border-collapse: collapse; /* Pour fusionner les bordures des cellules */
|
| 8 |
}
|
| 9 |
+
th, td {
|
| 10 |
+
border: 1px solid black; /* Ajoute une bordure à toutes les cellules */
|
|
|
|
|
|
|
| 11 |
}
|
| 12 |
</style>
|
| 13 |
+
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
| 14 |
</head>
|
| 15 |
<body>
|
|
|
|
| 16 |
<h1>Convertisseur Markdown</h1>
|
| 17 |
+
<textarea id="markdown" cols="50" rows="10"></textarea>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
<button onclick="convertir()">Convertir</button>
|
| 19 |
+
<div id="preview"></div>
|
| 20 |
|
|
|
|
| 21 |
<script>
|
| 22 |
function convertir() {
|
| 23 |
+
var markdownText = document.getElementById('markdown').value;
|
| 24 |
var html = marked.parse(markdownText);
|
| 25 |
+
document.getElementById('preview').innerHTML = html;
|
| 26 |
}
|
| 27 |
</script>
|
|
|
|
| 28 |
</body>
|
| 29 |
</html>
|