File size: 1,944 Bytes
d992149
ed14eea
d992149
ed14eea
 
da73938
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a635ead
 
da73938
0e0b9f6
 
da73938
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e88b4df
da73938
 
 
ed14eea
da73938
e88b4df
da73938
 
 
ed14eea
 
d992149
 
da73938
 
ed14eea
da73938
 
 
 
 
 
 
 
ed14eea
 
da73938
ed14eea
da73938
ed14eea
 
d992149
ed14eea
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE html>
<html>
<head>
  <title>Convertisseur Markdown</title>
  <style>
    body {
      font-family: 'Arial', sans-serif;
      display: flex;
      flex-direction: column;
      align-items: center;
      min-height: 100vh;
      background-color: #f0f2f5; /* Fond gris clair */
      margin: 0;
    }

    .container {
      background-color: white;
      border-radius: 8px;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
      padding: 20px;
      width: 80%;
      max-width: 800px;
    }

    h1 {
      text-align: center;
      color: #333; /* Gris foncé */
    }

    textarea, #preview { 
      overflow-y: auto;
      width: 100%;
      height: auto;
     overflow: hidden;
      padding: 10px;
      border: 1px solid #ddd;
      border-radius: 4px;
      resize: vertical;
      font-family: monospace;
    }

    button {
      background-color: #007bff; /* Bleu primaire */
      color: white;
      padding: 10px 20px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      margin-top: 10px;
      transition: background-color 0.3s ease; /* Effet de survol */
    }

    button:hover {
      background-color: #0069d9; /* Bleu plus foncé au survol */
    }

    table {
      border-collapse: collapse;
      width: 100%;
      margin-top: 10px;
    }

    th, td {
      border: 1px solid #ddd;
      padding: 8px;
      text-align: left;
    }
  </style>
</head>
<body>
  <div class="container">
    <h1>Convertisseur Markdown</h1>

    <textarea id="markdown"></textarea>

    <button onclick="convertir()">Convertir en HTML</button>

    <div id="preview"></div>
  </div>

  <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
  <script>
    function convertir() {
      var markdownText = document.getElementById("markdown").value;
      var html = marked.parse(markdownText);
      document.getElementById("preview").innerHTML = html;
    }
  </script>
</body>
</html>