Embeds
An embed is a JDoodle editor running inside your own web page. It shows one of your projects, so your readers write and run that code without leaving what you wrote, and without needing a JDoodle account.
Two lines of code add one to a page.
What it is good for
- Documentation. An example your readers can run and change, instead of a code block they have to copy somewhere.
- Courses and tutorials. An exercise on the page where you explain it.
- Your own product. A working editor without building one, and without handling credentials.
What readers can do
Visitors can edit and run the project. Their changes affect only their own screen. Nothing they do changes your project, and the next visitor starts from what you set.
One kind of embed
There is one kind. Older accounts may still see the words BASIC or PREMIUM against embeds created years ago, but nothing chooses between them now and every new embed is created with the full set of capabilities.
Embed or API
Both run code, and both can give your page the result.
The real difference is who renders the editor. With an embed we render it inside your page and your scripts drive it. With the API you build the interface yourself and your server calls us.
An embed needs no credentials and no backend, so if a JDoodle editor in your page is acceptable, it is much less work.
Sending code instead of embedding it
If you do not want an editor in your page, you can keep your own code block and give readers a button that opens it in JDoodle. Posting code to JDoodle does that with a plain HTML form.
What next
Making one takes a minute. Deciding what it shows takes longer, and matters more.