Embed a Notebook
Any SpiceBook notebook can be embedded on a third-party page via iframe. No API key or authentication is required — embeds are public and read-only, but viewers can still run simulations and see results.
Embed URL
Section titled “Embed URL”https://spicebook.warehack.ing/embed/{notebook_id}?theme=dark| Parameter | Values | Default | Description |
|---|---|---|---|
theme | dark, light | dark | Initial color theme |
iframe Snippet
Section titled “iframe Snippet”<iframe src="https://spicebook.warehack.ing/embed/{notebook_id}?theme=dark" width="100%" height="600" style="border: 1px solid #334155; border-radius: 8px;" allow="clipboard-write"></iframe>Replace {notebook_id} with your notebook’s ID (visible in the browser URL bar when editing, or returned by the API).
What Viewers Can Do
Section titled “What Viewers Can Do”Embedded notebooks render in a read-only mode with working simulation:
- Read markdown cells and SPICE netlist source
- Run SPICE cells and see waveform results
- View previously-generated schematics and plots
- Copy code from cells via clipboard
Viewers cannot edit cell content, add or delete cells, or change notebook metadata.
Sizing
Section titled “Sizing”The iframe adapts to the width of its container. Set width="100%" for responsive layouts. The height should be tall enough to show the notebook content without excessive scrolling — 600px works well for notebooks with 2-4 cells.
The SpiceBook backend allows framing from any origin by default. If your deployment uses a restricted CORS_EXTRA_ORIGINS configuration, ensure the embedding domain is included.