Skip to content

Commit ca1232e

Browse files
authored
Merge pull request #83 from LiquidGalaxyLAB/add-manual
add: highlighting of uttered word
2 parents 2d150ef + 2831472 commit ca1232e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

js/components/read-aloud.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ class ReadAloudComponent extends HTMLElement {
256256
!this.isPaused
257257
) {
258258
utterance.text = this.words[this.currentWordIndex];
259+
console.log("highlighting word:");
259260
this.highlightCurrentWord(
260261
this.paragraphElement,
261262
this.words,

js/components/voice.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ export class LGVoice extends HTMLElement {
114114
flex: 1;
115115
}
116116
117+
.highlighted-read-out {
118+
text-decoration: underline;
119+
color: var(--md-sys-color-primary);
120+
}
121+
117122
.ripple::after {
118123
position: absolute;
119124
inset-inline-start: 50%;

0 commit comments

Comments
 (0)