Include JavaScript LTSPICE drawing module
<!-- LTSPICE -->
<SCRIPT SRC="../SPICE_HTML_2018_02/LTSPICE.js"></SCRIPT>
Create a canvas and controls
The ctrlid DIV gives the option to show the LTSPICE source code, change fontsize and line thickness.
The link gives you direct acces to the LTSPICE file.
There has to be sections "<PRE> for subcircuits and the main circuit.
<canvas id="WS2011_Prob4" width="400" height="300" class="LTSPICE" level="1"
sym='Switch'> </canvas>
Add to LTSPICE queue
document.addEventListener("load", findLT());
Loading LTSPICE files does not work on a local file system.
Solution:
Run a webserver: node.js oder xammp.
Firefox: about:config set privacy.file_unique_origin false