begin project-start doc

+ improve embed + repl package doc
This commit is contained in:
Felix Roos 2024-03-22 15:52:38 +01:00
parent 8d96a071d6
commit 6365e1626c
8 changed files with 279 additions and 25 deletions

View file

@ -4,7 +4,7 @@ class Strudel extends HTMLElement {
}
connectedCallback() {
setTimeout(() => {
const code = (this.innerHTML + '').replace('<!--', '').replace('-->', '').trim();
const code = this.getAttribute('code') || (this.innerHTML + '').replace('<!--', '').replace('-->', '').trim();
const iframe = document.createElement('iframe');
const src = `https://strudel.cc/#${encodeURIComponent(btoa(code))}`;
// const src = `http://localhost:3000/#${encodeURIComponent(btoa(code))}`;