Mercurial Hosting > lang
comparison src/site.js @ 28:99b71a377f2c
audio for textarea
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sat, 02 Aug 2025 20:04:35 -0600 |
parents | f5425a3c1898 |
children | 505185272dd7 |
comparison
equal
deleted
inserted
replaced
27:176a182c02cf | 28:99b71a377f2c |
---|---|
137 for( let rt of rts ) { | 137 for( let rt of rts ) { |
138 rt.remove(); | 138 rt.remove(); |
139 } | 139 } |
140 //console.log(mdDiv.textContent); | 140 //console.log(mdDiv.textContent); |
141 let lang = div.getAttribute('lang'); | 141 let lang = div.getAttribute('lang'); |
142 text += `\n<p><audio controls preload=none src="/tts.mp3?lang=${lang}&text=${encodeURIComponent(mdDiv.textContent)}"></p>\n`; | 142 text += `\n<p><audio controls preload=none src="/tts.mp3?lang=${lang}&text=${encodeURIComponent(mdDiv.textContent)}"></audio></p>\n`; |
143 } | 143 } |
144 div.innerHTML = text; | 144 div.innerHTML = text; |
145 div.removeAttribute('markdown'); | 145 div.removeAttribute('markdown'); |
146 } | 146 } |
147 } | 147 } |