Skip to content
← Back to Community
Auto-run embedded Repl.it code
Profile icon
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:

Screenshot_20181218-130637_Chrome

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
Profile icon
CheatOr1
Profile icon
BhaktiRaigawali
Profile icon
eflow
Comments
hotnewtop
Profile icon
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