Skip to content

Commit beca121

Browse files
committed
~
1 parent 9a0b94a commit beca121

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

resources/views/markdown/inc-markdown-afficher-js.blade.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@
4646
})
4747
4848
49-
50-
51-
5249
// markdown_content
5350
document.querySelectorAll('.markdown_content').forEach(el => {
5451
@@ -62,6 +59,7 @@
6259
6360
6461
// Latex
62+
/*
6563
document.addEventListener("DOMContentLoaded", function() {
6664
// Vérifie si MathJax est chargé et que typesetPromise est disponible
6765
if (typeof MathJax !== "undefined" && MathJax.typesetPromise) {
@@ -79,6 +77,21 @@
7977
console.error("MathJax n'est pas disponible ou la fonction typesetPromise n'existe pas.");
8078
}
8179
});
80+
*/
81+
document.addEventListener("DOMContentLoaded", function() {
82+
if (typeof MathJax !== "undefined" && MathJax.typesetPromise) {
83+
MathJax.startup.promise = MathJax.startup.promise || Promise.resolve();
84+
85+
// Démarrer le rendu pour l'ensemble du document
86+
MathJax.startup.promise.then(() => {
87+
MathJax.typesetPromise().then(() => {
88+
console.log("MathJax a rendu les équations pour toute la page !");
89+
}).catch((err) => console.error("Erreur lors du rendu avec MathJax:", err));
90+
});
91+
} else {
92+
console.error("MathJax n'est pas disponible ou la fonction typesetPromise n'existe pas.");
93+
}
94+
});
8295
8396
});
8497

resources/views/welcome.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
<div class="text-center text-white bg-dark small" style="float:left;font-weight:bold;border-radius:50%;width:15px;margin:2px 8px 5px 0px;">1</div> Créer un sujet (exercice Python, PDF, Markdown...)
9090
</div>
9191
<div style="clear:both;">
92-
<div class="text-center text-white bg-dark small" style="float:left;font-weight:bold;border-radius:50%;width:15px;margin:2px 8px 5px 0px;">2</div> Modifier / duplier / partager le sujet
92+
<div class="text-center text-white bg-dark small" style="float:left;font-weight:bold;border-radius:50%;width:15px;margin:2px 8px 5px 0px;">2</div> Modifier / dupliquer / partager le sujet
9393
</div>
9494
<div style="clear:both;">
9595
<div class="text-center text-white bg-dark small" style="float:left;font-weight:bold;border-radius:50%;width:15px;margin:2px 8px 5px 0px;">3</div> Proposer un environnement sujet-copie aux élèves

0 commit comments

Comments
 (0)