Skip to main content

What is a code node

Upload your own HTML file to add custom interactive content to a Story.

A code node lets you add custom interactive content to a Story. Upload a single HTML file for self-contained content, or upload a folder or ZIP when the HTML uses separate image files. Use code nodes for activities such as sorting games, calculators or mini simulations. The content plays inside the Story, and learners move on with the Continue button when they’re done. You don’t need to know how to code: an AI assistant can build the HTML file for you.

Let me show you how to set this up.

Before you start

You need one HTML file (.html or .htm) of up to 1 MB. Text, styling and interactivity have to be inside that file. Images can be inside the file too, or separate image files in the same folder (see Adding images to your code node below).

The easiest way to make one is with an AI assistant such as ChatGPT, Claude or Copilot. Download our instructions for AI assistants below and give them to your assistant before you describe what you want. They explain exactly what works inside a code node, so the file works the first time.

Creating your HTML file with an AI assistant

  1. Open your AI assistant and upload or paste the instructions file.

  2. Describe what you want learners to do. Include who the learners are, the language, and your brand colors if the content should match them. For example: "Using the instructions I've shared, create an activity where learners sort eight AI systems into the four risk levels of the EU AI Act. Learners are compliance managers. Write it in English and use #4F46E5 as the main color."

  3. Ask for one HTML file, then download it. If it uses separate images, ask for a ZIP of the folder with the HTML and the images instead.

  4. Open the file in your browser to check that it works. Make the browser window smaller to see how it looks on a phone or in a small window.

🦸🏽‍♀️ Pro tip: Before you download, ask your assistant to check the file against the checklist at the end of the instructions. It catches most problems before you upload.

Adding a code node to your Story

1) In your node map, open the node menu and select Code (shortcut: C).

2) Select the new code node, then select Edit to open it.

3) Drag your HTML file onto the upload area, or click the area to browse your computer. If your HTML uses separate image files, upload the folder or a ZIP of it instead. Your content appears as a preview straight away.

4) Adjust the settings in the right-hand panel (see below), then select Done to go back to your node map.

Adding images to your code node

If your activity uses images, they can be separate files instead of being built into the HTML file. Put the images in the same folder as the HTML file, or in a sub-folder of it, and upload the whole folder or a ZIP of it in step 3 above. We Are uploads the HTML and the images together.

  • Supported images: PNG, JPG, GIF or WebP, up to 10 MB each. You can add up to 50 images per node, and the HTML and images can be up to 100 MB in total.

  • No SVG files. Ask your assistant to put SVG graphics inside the HTML file instead.

  • One main HTML file. If the folder holds several HTML files, the main one must be named index.html.

  • Other files are skipped. Only the HTML file and the images are uploaded. Anything else in the folder is listed as skipped after the upload.

After the upload, the editor lists your images by name. You can replace any of them with a file from your computer or with an image from your media library.

To change the HTML later, use Download HTML in the editor to get the current version of the file. The image links in it end with # and the image name. Keep these, because they’re how the editor recognizes your images when you upload the file again.

Customizing the code node

You can change how the code node looks in the right-hand panel:

  • Continue button: Change the button text (up to 50 characters) and set its Background color and Text color.

  • Theme: Apply one of your themes to the node.

  • Background: Choose the color or gradient shown behind your content. If your HTML file sets its own background color, We Are uses it as the node background when you first upload the file, so the edges match.

Showing the Continue button only when learners are done

By default, the Continue button is visible the whole time, so learners can move on whenever they like. If learners should finish the activity first, ask your AI assistant to hide the Continue button until they’re done. The instructions for AI assistants explain how, so you only need to say when the button should appear. For example: "Keep the Continue button hidden until the learner has placed all eight AI systems correctly."

Keep these things in mind:

  • Learners can’t leave the node without the Continue button. Make sure it appears at the end of every path through your activity, including when the learner starts over or something goes wrong. If you’re unsure, leave the button visible.

  • The editor preview always shows the button. Hiding it isn’t supported in the preview yet, so check it by playing your Story.

Previewing on desktop and mobile

Use the desktop and mobile icons at the top right of the editor to see how your content looks on each screen size, and the play button to preview it. Learners may open your Story on a phone, or inside an LMS where the Story gets a small window, so check both views.

Replacing the HTML file

To upload a new version, select Replace file under HTML file, or drop the new file onto the preview. If you upload only the HTML, the images already on the node are kept, as long as the new HTML uses the same image paths. The node also keeps its current background. If the new file uses a different background color, update Background to match.

What works inside a code node

To keep learners safe, your HTML file runs in a protected area of the Story. That means some things work differently from a normal website:

  • Images and scripts from other websites don’t load. Images you upload with the HTML, images from your We Are media library and Google Fonts do.

  • Pop-up messages, new tabs, downloads and forms don't work. Ordinary links replace your content with no way back, so avoid links.

  • Nothing is saved. Progress resets every time a learner opens the node.

  • Scores and completion aren't sent to your LMS. Learners finish the node with the Continue button. Your file can still hide the Continue button until the learner is done (see above).

  • The bottom of the screen is reserved. The Continue button and player controls sit on top of it, so buttons placed there can’t be clicked. On phones, the top of the screen is reserved too, because the player’s menu and navigation buttons sit there.

The instructions for AI assistants cover all of this, so you don't need to explain it yourself.

Troubleshooting

The upload is rejected

Check that there’s exactly one HTML file (.html or .htm) and that it’s under 1 MB. If the folder holds several HTML files, name the main one index.html. Large images inside the HTML file are the usual cause, so ask your assistant to move them into separate image files. Images must be PNG, JPG, GIF or WebP, up to 10 MB each, at most 50 per node and 100 MB in total. SVG files aren’t supported, so ask your assistant to put SVG graphics inside the HTML.

Images or styling are missing

The file is loading something from another website. Ask your assistant to put everything inside the file, or to use separate image files in the same folder. If images you uploaded with the HTML are missing, ask your assistant to refer to each image by its exact file path, and to keep the images in the same folder as the HTML or in a sub-folder of it.

Buttons don't respond or the content is blank

The file most likely uses a library from another website. Ask your assistant to rebuild it with plain JavaScript and no external libraries.

A button is hidden behind the Continue button

Ask your assistant to keep the bottom 96 px of the screen free of buttons, and the top 80 px too on phones.

The content looks cramped inside an LMS

Ask your assistant to make the layout work in a window as small as 700 × 450 px, and on phones down to 320 px wide.

Learners can’t move on from the code node

The file hides the Continue button and never shows it again on some path through the activity. Ask your assistant to make sure the Continue button appears at the end of every path, including starting over and error states, or to leave the button visible the whole time.

The Continue button shows from the start, even though it should be hidden

The editor preview always shows the button, so check it by playing your Story. If it’s still visible there, ask your assistant to check that the Continue button meta tag is in the head of the file, as described in the instructions.

Related Articles

Did this answer your question?