Show code when Embedding?

Is it possible to have a REPL default to the code window when embedding? Any time I’ve embedded a REPL in my site, it defaults to the output tab, which is blank. Would love to show the code tab first.

2 Likes

I’m happy to say…it is! Here’s an example from my wonderful colleague:

So if I wanted to link to index.html in the repl hosting my website, I’d take the embed url (https://replit.com/@username/repl-name?lite=1) and add #[filename] to the end.This would give me a result of https://replit.com/@username/repl-name?lite=1#main.html

Try it out and let me know if you run into any trouble!

1 Like

This is really close to what I’m looking for but what this does is open the code on top and console on bottom. When embedding, it is much more user-friendly to either have the console on the right or not at all.

What I’ve been using is the “embed=true” URL option. It gives this:
image

Which is great but when using it for example code, it’s not awesome. What I was hoping for is the ability to embed in this way but have the “Code” tab displayed first like this:
image

It’s ok if this is not possible. It’s a small request and quite “nitpicky”.

Cheers.

1 Like

I’m not sure if something changed recently for embeds but now the “Open” bar on the top is hiding the console. It is overlapping on top of the console, hiding any output or prompts at the beginning of a project.

image

If you take a look at my previous screenshots, this wasn’t the case as of last week…

1 Like

Thanks for letting us know! I’ll share this with our team. Can you clarify if you’re using mobile or desktop in these screenshots?

1 Like

All from desktop (Chrome browser). Students are seeing the same issue.

1 Like