The ‹dia-livecode› web component embeds the Glitch collaborative code editor in a diapositive of a slideshow
npm install @petitatelier/dia-livecodeDefines the ‹dia-livecode› web component, which displays the Glitch collaborative code editor and/or preview inside a diapositive of a slideshow.
1. Glitch as the provider of the live-coding collaborative editor (and Stackblitz could easily be added, both use a similar URL scheme);
2. Specification of Glitch project with project="‹projectId›";
3. Editor / Preview / Embed views of Glitch with mode="editor|preview|embed" attribute;
4. Selection of file to edit with file="‹filename›" attribute;
5. Auto-refresh with refresh="‹timeout›" attribute (timeout in milliseconds); useful for preview mode.
``html``