fix: Entferne doppelte Textverarbeitung und Sonderzeichen
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
This commit is contained in:
parent
e9f959f0d6
commit
0256ccdf91
2 changed files with 6 additions and 2 deletions
|
|
@ -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);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,9 +20,12 @@
|
|||
<div class="mb-4">
|
||||
<h5 class="card-title">Vorlage: <span id="lesson-title">{{ current_lesson_title }}</span></h5>
|
||||
<div id="target-text" class="border p-3 bg-white rounded" style="white-space: pre-wrap; font-family: monospace;">
|
||||
{{ current_text|safe }}
|
||||
<!-- Text wird durch JavaScript eingefügt -->
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
window.initialText = {{ current_text|tojson }};
|
||||
</script>
|
||||
|
||||
<!-- Eingabefeld -->
|
||||
<div class="mb-4">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue