Docfile commited on
Commit
ed14eea
·
verified ·
1 Parent(s): d992149

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +31 -14
index.html CHANGED
@@ -1,20 +1,37 @@
1
  <!DOCTYPE html>
2
- <html lang="fr">
3
  <head>
4
- <meta charset="UTF-8">
5
- <title>Affichage Markdown</title>
6
- <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
 
 
 
 
 
 
 
 
7
  </head>
8
  <body>
9
- <div id="markdown-content">Chargement du contenu Markdown...</div>
10
- <textarea id="markdown-input" style="width: 100%; height: 100px;">Écrivez votre Markdown ici!</textarea>
11
- <button onclick="updateContent()">Mettre à jour le contenu</button>
12
 
13
- <script>
14
- function updateContent() {
15
- var markdownText = document.getElementById("markdown-input").value;
16
- document.getElementById("markdown-content").innerHTML = marked(markdownText);
17
- }
18
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
19
  </body>
20
- </html>
 
1
  <!DOCTYPE html>
2
+ <html>
3
  <head>
4
+ <title>Convertisseur Markdown</title>
5
+ <style>
6
+ .container {
7
+ display: flex;
8
+ }
9
+ textarea, #preview {
10
+ width: 50%;
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("markdown-input").value;
31
+ var html = marked.parse(markdownText);
32
+ document.getElementById("preview").innerHTML = html;
33
+ }
34
+ </script>
35
+
36
  </body>
37
+ </html>