Code snippets - Copy to Clipboard - Synthesize Speech HTML

Speech Synthesis

Silence

Silence Template

Silence Samples

Variable Naming Schemes

  • snake_case
  • camelCase
  • PascalCase

Credit due

https://www.w3schools.com/howto/howto_js_copy_clipboard.asp

https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_copy_clipboard


Escaped code


<h2>Speech Synthesis</h2>

<h3>
Silence
</h3>

<h4>
Silence Template
</h4>

<p>

<input type="text" 
value='<silence msec="00"/>' 
id="silence-00">

<button onclick="silenceFunctionName()">&lt;silence msec=&quot;00&quot;/&gt;</button>
</p>

<script>
function silenceFunctionName() {
  var copyText = document.getElementById("silence-00");
  copyText.select();
  copyText.setSelectionRange(0, 99999)
  document.execCommand("copy");
}
</script>

<h4>
Silence Samples
</h4>


<section class="template">

<p>
<input type="text" value='<silence msec="00"/>' id="silence">
<button onclick="myFunction()">&lt;silence msec=&quot;00&quot;/&gt;</button>
</p>

<script>
function myFunction() {
  var copyText = document.getElementById("silence");
  copyText.select();
  copyText.setSelectionRange(0, 99999)
  document.execCommand("copy");
}
</script>

</section>


<h2>
Variable Naming Schemes
</h2>

<ul>
  <li id="snake_case">snake_case</li>
  <li id="camelCase">camelCase</li>
  <li id="PascalCase">PascalCase</li>
</ul>



<h2>Credit due</h2>

<p>https://www.w3schools.com/howto/howto_js_copy_clipboard.asp</p>

<p>https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_copy_clipboard</p>