diff --git a/static/js/script.js b/static/js/script.js index 134da1f..e6c8b4d 100644 --- a/static/js/script.js +++ b/static/js/script.js @@ -14,7 +14,7 @@ document.addEventListener('DOMContentLoaded', function() { const wpmElement = document.getElementById('wpm'); // Aktuelle Textdaten - let currentText = document.querySelector('#target-text').textContent; + let currentText = window.initialText; // Fokus auf das Eingabefeld setzen userInput.focus(); @@ -197,5 +197,6 @@ document.addEventListener('DOMContentLoaded', function() { } // Initialisiere Statistik und Textfarben + updateTextHighlighting('', currentText); updateStatistics('', currentText); }); diff --git a/templates/index.html b/templates/index.html index c280800..6c7d29d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -20,9 +20,12 @@
Vorlage: {{ current_lesson_title }}
- {{ current_text|safe }} +
+