Auto-Run Configuration¶
Control whether panel-live editors execute code automatically on page load using the auto-run attribute.
Auto-run enabled (default)¶
Set auto-run="true" (or omit it — true is the default) to run code as soon as the editor loads:
Use this for demos and showcases where you want visitors to see results immediately.
Auto-run disabled¶
Set auto-run="false" to require the user to click Run before code executes:
Use this for tutorials and learning exercises where you want the reader to review the code first.
Fence syntax¶
When to use each¶
| Scenario | Recommended |
|---|---|
| Gallery / showcase pages | auto-run="true" |
| Step-by-step tutorials | auto-run="false" |
| Heavy computations | auto-run="false" |
| Simple hello-world demos | auto-run="true" |