Ask coding questions

← Back to all posts
Auto-run embedded Repl.it code
nakov

I am writing an interactive book with Python examples. I implemented [Run Code] button for the code examples, e.g. https://cryptobook.nakov.com/cryptographic-hash-functions.html

This is how it looks like:

I need an auto-run functionality for the embedded Repl.it code snippets. Now users first click the [Run] button and after the embedded <iframe> is loaded, they need to click another [Run] button. I need autorun=1 parameter for the embedded repls.

Does anyone have a solution for this?

Voters
BhaktiRaigawali
wgyt
eflow
Comments
hotnewtop
mat1

This currently isn't possible with a url parameter. However, you could use repl.run (repl-name.username.repl.run) to run your repl automatically but without the code. Otherwise, it isn't possible.

Please upvote my comment if it was helpful or useful in any way