The Code Playground is an in-app lightweight code editor for fast and effortless prototyping.
Code Playground provides developers with a low-barrier entry point for add-on development, allowing you to experiment and iterate on ideas directly without any setup, from within Adobe Express. From learning the basics to rapidly prototyping advanced concepts, Code Playground accommodates all stages of add-on development.
The Code Playground is designed for:
| Feature | Description |
|---|---|
| Real-Time Preview | See your changes as you code, allowing for immediate feedback and faster adjustments. |
| Effortless Prototyping | Quickly turn ideas into add-ons with minimal setup. |
| Rapid Implementation | Fast-track your prototype to a product by directly pasting your code into an add-on template. |
| Script Mode | An easy way to interact with the Document APIs quickly. |
| Programming Assistance | Typed definitions and auto-completion. |
| Default Boilerplate Code | Default boilerplate code for each tab helps you get started quickly. |
| Local Persistence | Save your work to your browser’s local storage and resume where you left off, preventing accidental loss. |
| Keyboard Shortcuts | Use keyboard shortcuts to save, run, and reset your code quickly. |
The Code Playground is designed to support the following development workflow use cases:
Enable Add-on Development if it’s not already enabled:

Toggle on Code Playground at the bottom of the panel:

Once enabled, the playground window will open, allowing you to begin coding immediately:

The playground offers two distinct development modes:
sandbox/code.js file in an add-on project running locally, but allows you to rapidly test in Express directly.| Comparison Factor | Script Mode | Add-on Mode |
|---|---|---|
| Purpose | Quick document manipulation tests | Complete add-on UI and functionality |
| Environment | Document Sandbox only | Both iframe and Document Sandbox |
| API Access | Document APIs | Document APIs + Add-on UI SDK |
| Global Await | Yes | No |
| Automatic Imports | Yes | No |
| UI Components | No UI building | Full HTML/CSS/JS interface creation |
| Best For | Testing document operations | Building complete add-ons |
Note: The code you write in this mode is equivalent to the code you would write and use in the sandbox/code.js file in an add-on project running locally.
editor object.

Head over to our How-to guides to see some examples of using the Document APIs with example code snippets. For instance, the guides:
No UI: Script mode is focused on Document API interactions and does not support building a user interface. If you want to create a UI, switch to Add-on mode.
Global Await: The script runtime provides a global async wrapper, allowing you to use await directly when executing asynchronous code, without needing to wrap it in an async function. This is particularly useful for API calls that return promises, where an await is needed to pause the execution of an async function until the Promise is resolved or rejected. For example, loading a font is an asynchronous operation, but in Script mode you can use await directly to pause the execution of the script until the font is loaded, ie:
// The script runtime provides an async wrapper to allow this:
const textNode = editor.context.selection[0];
const lato = await fonts.fromPostscriptName("Lato-Light");
In contrast, in Add-on mode you will need to manually wrap the code in an async function and use await in it, ie:
//sandbox.code.js or Document JS tab
loadFont: async () => {
const textNode = editor.context.selection[0];
const lato = await fonts.fromPostscriptName("Lato-Light");
}
express-document-sdk modules, so you don’t need to add import statements for the Document APIs. However, if you do add import statements, it wont harm anything.Once you switch to the Add-on mode or to your local add-on development environment, you will need to make sure to handle your async functions and import statements manually.


The Add-on mode features four tabs for organizing your code:
This tab is for writing HTML code that defines the structure of your add-on’s user interface. You can create elements like buttons, text fields, and layout containers here. Functionally, this tab mirrors the role of the index.html file you’d use in a typical add-on project.
Style your add-on’s HTML elements in this tab. Create a visually appealing interface consistent with Adobe Express design patterns. This section corresponds to the styles.css file in a standard add-on project.
This tab is for writing JavaScript code that runs in the iframe context of your add-on. Here, you can interact with:
addOnUISdk)This environment corresponds to the code you would typically write in your index.js or UI JavaScript files in a full add-on project.
This tab is where you write JavaScript code that interacts directly with the Adobe Express document. It runs in the Document Sandbox environment and gives you access to:
The Document JS tab corresponds to the code typically found in the code.js file of a complete add-on project.
Once you’ve tested your code in Script mode, you can easily transition it into the Add-on mode to build a user interface around your new functionality. Here’s how:
import statements for the Document APIs and handle your async functions manually in this mode.Keyboard Shortcuts, local save and session management are all designed to help you get the most out of the Code Playground.
| Action | Windows/Linux | macOS |
|---|---|---|
| Save | Ctrl + Shift + S | Cmd + Shift + S |
| Run | Ctrl + Shift + Return/Enter | Cmd + Shift + Return/Enter |
| Reset | Ctrl + Shift + X | Cmd + Shift + X |
| Increase font size | Ctrl + Shift + Plus (+) | Cmd + Shift + Plus (+) |
| Decrease font size | Ctrl + Shift + Minus (-) | Cmd + Shift + Minus (-) |
| Switch between tabs | Ctrl + 1, 2, 3, 4 | Cmd + 1, 2, 3, 4 |
| View the typings suggestions | Ctrl + space | Cmd + space |
Use the “…” button in the top right corner of the playground window to reference the available keyboard shortcuts, start a new session, link to documentation and more.
The Code Playground features local persistence to help prevent the loss of your work. This functionality ensures that your code is stored in your browser’s local storage, providing a safeguard against accidental data loss.
Code in the playground is not saved automatically. To ensure it’s saved, you need to take one of the following steps:
If you don’t want to save your work at any time, use the keyboard shortcut to Reset.
There are two ways to resume working on your last saved session:
Via the Add-ons Panel:

Via the Your add-ons Page:

After experimenting with the Code Playground and when you’re ready to build out a full-blown add-on in a local development environment:
sandbox/code.js file, you’ll need to add the import statements for the Document APIs and handle your async functions manually.src/manifest.json file in your new project.The Adobe Express Code Playground is a lightweight code editor designed for fast and effortless prototyping. It allows you to experiment with simple code snippets to build and refine add-ons, quickly turning ideas into functional features.
Yes, the Code Playground is free to use. You can access all its features without any cost and start prototyping and creating add-ons right away.
While some basic coding knowledge is helpful, Playground is designed to be beginner-friendly and accessible. Its intuitive interface and simple code snippets make it easier for both experienced developers and those newer to coding to create and test add-ons.
Getting started is simple. activate the playground, experiment with code snippets, and start building your add-ons. Use the real-time preview feature to see your changes instantly and iterate on your ideas with ease.
Join our Discord to chat with the add-on developer community.