Forem Creators and Builders 🌱

Nikki Goel
Nikki Goel

Posted on

Embedding DartPad

Feature request

Embedding dartpad, an online editor for Dart lang.

This is the link for dartpad.
According to dartpad wiki, dartpad can be embedded using iframe HTML tag. But doesn't support it.

Parameters Required

Width and Height:
We should able to set width and height of the dart-pad code editor

A user should we able to use all the controls provided like:
Run, Reset, etc.

Here's an example from wiki

<iframe style="width:400px;height:400px;" src=""></iframe>
Enter fullscreen mode Exit fullscreen mode

Below is an example of how it looks when embedded.

dart-pad embed example


Like codepen, dartpad is also a online code editor.
A solution for embedding dartpad would be great.

Why is it needed?

I have an article in which I'm using Dart lang. Embedding dartpad would be best way to enhance the article.

The reader can run the code here itself without leaving the website, rather than copy-pasting it in some editor and then running it.

Final Note

Let me know if you need any elaboration.

Top comments (2)

ben profile image
Ben Halpern

The current hangup is that we want to make liquid embeds more generic and extensible and haven't yet gotten to that point β€” so embedding Dartpad right now isn't an obvious choice if we're planning to re-do how this is done.

That being said, if we can determine with certainty how far away we are from the re-implementation we can get a better sense on when Dartpad could land.

Basically, yes to Dartpad at some point, unclear just how soon that can be.

nicks101 profile image
Nikki Goel

I too would love a generic solution for embedding links.
I hope there's a solution soon.