Custom Code block

Build any eLearning game with AI. Paste it into your course.

Ask ChatGPT, Claude or Gemini for a game, simulation or calculator as one HTML file, and paste it into the Custom Code block. It runs inside your SCORM package, offline, in any LMS, and unlocks Continue when the learner is done.

1
HTML file is enough
100
MB projects (ZIP)
0
Servers or plugins
4
Formats: SCORM 1.2, 2004, xAPI, cmi5

Every course needs one activity no template has

A simulation of your own software. A calculator for your own pricing. A game that fits your topic instead of a generic quiz. Until now that meant a developer, a hand-made SCORM wrapper, or an iframe to a page someone has to host and keep online.

AI assistants changed the first part: anyone can now describe an interaction and get working HTML in a minute. What was missing was a safe place to put it, inside the course, that works in any LMS.

The Custom Code block is that place

Paste the HTML, or upload a ZIP project. It runs in a sandbox inside the course, ships inside the SCORM package, and works offline in Moodle, Canvas, Cornerstone, SuccessFactors or whatever your learners use. Vibe coding for instructional designers, without the hosting, the wrapper or the risk.

Endless possibilities, built in minutes

If you can describe it, an AI can build it, and the Custom Code block runs it. Some of what authors make:

Drag-and-drop games

Sorting, matching, ordering and categorising, with your own artwork and rules. Recycling bins, risk ratings, steps of a procedure.

Software and process simulations

A mock-up of the screen people really use: click through a CRM, fill in a form, find the setting. Safe practice before the real system.

Calculators and what-if tools

Loan and ROI calculators, dosage checks, carbon footprints, pricing tools. Learners change the numbers and see the result move.

Explorable diagrams and maps

A machine to take apart, a floor plan to inspect, a body system to explore: click a part, learn about it.

Live data and charts

Sliders that redraw a chart, a budget that balances, a market that reacts. Data the learner plays with instead of reads.

Arcade-style mini games

Catch-the-right-answer, whack-a-myth, swipe-to-sort, a memory grid: short games that make recall fun.

Drills and timed practice

Typing tests, reaction drills, speed rounds on product codes or safety signs, with a personal best.

Anything else you can describe

Spot-the-difference, a phishing inbox to triage, a code playground, a 3D model on a canvas. If you can describe it, an AI can build it.

From prompt to course in five steps

  1. Ask any AI for one HTML file. Describe the activity, the audience and the rules. Ask for a single file with the CSS and JavaScript inside, no internet resources, and the completion line.
  2. Add a Custom Code block and paste it. Find it under Advanced in the block library. The code editor numbers and colours the code and lets you search and replace in it.
  3. Try it in the editor. The preview runs the real thing. Click through it, ask the AI for changes, paste again.
  4. Switch on Require completion. When the code calls window.parent.postMessage({ type: 'complete' }, '*'), Continue unlocks. The editor confirms "Completion received".
  5. Export to your LMS. SCORM 1.2, SCORM 2004, xAPI or cmi5. The activity is inside the package and needs nothing else.

What you see, and what learners see

The Custom Code block in the SCORMBuilder editor: HTML in a code editor with line numbers and syntax colours, Require completion switched on, and the sorting game running in the live preview.
The editor: paste the code, switch on completion, and the game runs in the preview below.
In the course

It plays like part of the course, because it is

The activity fits the page width, resizes itself to its content, and sits between your other blocks like any of them. With completion required, Next stays locked until the game is finished.

A learner halfway through the sorting game in the course player; the Next button is still locked.
Halfway through: Next is locked.
The sorting game finished with a score of 6 out of 6; the Next button is now unlocked.
All sorted: the code reports completion and Next unlocks.

Prompts you can copy and use

Paste one into ChatGPT, Claude or Gemini, then paste the answer into a Custom Code block. Each ends with the same requirements, so the result works offline and counts toward completion.

A sorting game

Make a drag-and-drop game for warehouse staff: sort 8 items into Recycle, Compost and Landfill bins. Shake the bin on a wrong drop, show a score, and a short explanation after each item. Requirements: one single HTML file with all CSS and JavaScript inline. No external libraries, CDNs, fonts or images from the internet (it must work offline). Make it keyboard-accessible and readable on a phone. When the learner has finished, call window.parent.postMessage({ type: "complete" }, "*").

Swap the topic and bins for any categorising task.

A software simulation

Recreate a simplified "New customer" form from a CRM. Guide the learner through 5 steps with hints, check each field, and show a summary at the end. Requirements: one single HTML file with all CSS and JavaScript inline. No external libraries, CDNs, fonts or images from the internet (it must work offline). Make it keyboard-accessible and readable on a phone. When the learner has finished, call window.parent.postMessage({ type: "complete" }, "*").

Describe the real screen, or paste a description of it.

A what-if calculator

Build an interactive calculator that shows how a 1% fee changes the value of a pension over 30 years, with two sliders and a line chart drawn on a canvas. Explain the result in one sentence. Requirements: one single HTML file with all CSS and JavaScript inline. No external libraries, CDNs, fonts or images from the internet (it must work offline). Make it keyboard-accessible and readable on a phone. When the learner has finished, call window.parent.postMessage({ type: "complete" }, "*").

Calculators make abstract numbers concrete.

A timed drill

Make a 60-second drill on road signs: show a sign drawn with SVG, offer 3 answers, keep score, and show the learner's best score. Let them switch the timer off before starting. Requirements: one single HTML file with all CSS and JavaScript inline. No external libraries, CDNs, fonts or images from the internet (it must work offline). Make it keyboard-accessible and readable on a phone. When the learner has finished, call window.parent.postMessage({ type: "complete" }, "*").

Short, replayable, and finishes with completion.

Upload project

Bigger builds: upload a whole project

When one file is not enough, upload a ZIP of up to 100 MB with index.html at its root and everything it uses: scripts, styles, images, audio, video, data files. HTML5 exports from other tools, Twine stories, p5.js sketches and canvas games all run.

  • The whole project travels inside the course
  • Files the code loads with fetch() or by name work too
  • Previews in the editor exactly as learners will see it
  • Works offline, from a desktop or any LMS

Safe by design, even for code you did not write

AI-written code, a colleague's project, a snippet from a forum: the Custom Code block treats all of it the same way.

Locked sandbox

The code runs in an isolated frame. It cannot read or change the course, the LMS page or anything else on screen.

No internet, at all

No requests to other sites, no pop-ups, no navigating away. Whatever a learner types stays inside the activity.

LMS data untouched

It cannot reach the SCORM, xAPI or cmi5 connection, scores or learner details. It can only say "done".

Nothing hosted

No server to run, no link to break, nothing for IT to approve. The activity is part of the package.

Shared previews stay clean

Review links from trial accounts show a notice in place of custom code, so nobody can use a free account to host a fake page.

Accessible when the code is

Give the frame a title for screen readers, and ask the AI for keyboard support and readable contrast. The prompts here do.

Other ways to get custom code into a course

SCORMBuilder Custom CodeEmbed a hosted page (iframe)Wrap HTML in SCORM by hand
Where the code livesInside the course packageOn a web server you keep runningIn its own SCORM package
Works offline and behind firewallsYesNoYes
Unlocks Continue when doneYes, one line of codeNoOnly if you write the SCORM calls
Sits between other lesson contentYes, it is a blockYesNo, it is a separate course
Protects the LMS from the codeSandboxed, no internetDepends on the hostNo, it runs with full access
Skills neededPaste what the AI gives youHosting and a domainSCORM manifests and JavaScript

Using Articulate Rise 360? Its Code block does something similar and needs an Articulate 360 AI licence. SCORMBuilder includes the Custom Code block in its single plan, and can import your Rise courses.

Questions

Do I need to know how to code?

No. Describe the activity to an AI assistant such as ChatGPT, Claude or Gemini, ask for one HTML file, and paste what it gives you into the Custom Code block. The editor shows it running straight away, so you can ask the AI for changes and paste again until it is right.

Which AI tools work?

Any assistant that writes HTML: ChatGPT, Claude, Gemini, Copilot and others. Ask for a single HTML file with the CSS and JavaScript inside it, no external libraries, and the completion line shown in the editor. The prompts on this page already include all of that.

How does the activity count toward completion?

Switch on Require completion and add one line where the activity ends: window.parent.postMessage({ type: 'complete' }, '*'). Until the code sends it, the Continue or Next button stays locked; when it does, the learner moves on. The editor shows "Completion received" so you can test it.

Does it send a score to the LMS?

Not today. The Custom Code block reports completion, which unlocks the course and counts toward finishing it. For scored questions, use the 32 interactive blocks and six game blocks, which report every answer to your LMS.

Does it work offline and in any LMS?

Yes. The code travels inside the SCORM, xAPI or cmi5 package as one self-contained document, so nothing is hosted anywhere and nothing is downloaded at run time. It plays in Moodle, Canvas, Cornerstone, SAP SuccessFactors, Docebo, TalentLMS and any other LMS that runs SCORM, and from a package opened on a desktop.

Is it safe to run code from an AI?

The code runs in a locked sandbox. It cannot read or change the course, the LMS page or the SCORM data, cannot see cookies or the learner's details, cannot open pop-ups or navigate away, and has no internet access at all, so it cannot send what a learner types anywhere. It can only draw inside its own box and say "done".

Can I upload a project with several files?

Yes. Upload a ZIP of up to 100 MB with index.html at its root, plus its scripts, styles, images, audio and data files. HTML5 projects from other tools, Twine stories, p5.js sketches and canvas games all work, as long as everything they need is in the ZIP. Files the code loads with fetch() work too.

Can the code call an API or load a library from a CDN?

No, on purpose. A course has to work offline, behind firewalls and in every LMS, and learners' input must not leave it. Ask the AI to include everything in the file; if a library is needed, put it in an uploaded ZIP.

What does it cost?

The Custom Code block is part of the single SCORMBuilder plan, $29 per author per month, with every feature included. There is a 14-day free trial with no card required.

Describe one activity. Paste it in. Watch it run.

Free for 14 days, no card required. The Custom Code block and all 65 block types are included.

Start free →