Forum Discussion
Rise 360’s new Custom Code Block — how far can it go to replace the need for Storyline blocks?
Over the last few years we have completed numerous RISE projects which used Storyline blocks to add different kinds of additional functionality and interactions. So we were excited to learn about the new Custom Code Block and to see what it can (and cannot) do...
There is no doubt it provides a simpler (and less resource intensive) option for including many simple learner engagements and interactions directly in the RISE framework. But we thought we would give it a bit of a workout to see if it could replace the Storyline in one of our most popular client requests - capturing learner notes and including them in a downloadable pdf at the end of the course.
We have a simple demo on our website that needed a bit of updating - it is a RISE course with three lessons and, at the end of each lesson, the learner is invited to enter their own notes which are stored in local browser storage to be retrieved by some Javascript coding to open a pdf notebook template, insert the learner's own notes and offer the new pdf for download:
Demo - Downloadable Notes using Storyline and Local Browser storage
The challenge was - Could we do the whole thing using custom code blocks?
We were genuinely impressed at how simple it was to capture text input using the Custom Code Block. Here’s a simplified version of what one of the note-taking blocks looked like:
<textarea id="notesInput" placeholder="Type your notes here..."></textarea>
<button id="saveBtn">Save</button>
<p id="statusMsg">Saved ✅</p>
<script>
(function(){
const key = 'eNotes1';
const input = document.getElementById('notesInput');
const msg = document.getElementById('statusMsg');
input.value = localStorage.getItem(key) || '';
document.getElementById('saveBtn').onclick = () => {
localStorage.setItem(key, input.value.trim());
msg.style.opacity = 1;
setTimeout(()=> msg.style.opacity = 0, 1500);
};
})();
</script>
Each block is independent and self-contained.
Once saved, that data is visible to any other Rise or Storyline block that runs in the same browser session, because they share the same domain and localStorage space.
Data persistence worked perfectly — notes and learner name fields reappeared even when the course was reopened.
However, In our Storyline demo, the final slide uses the excellent pdf-lib JavaScript library to fill a PDF template and download it using the tiny-save-as library:
const { PDFDocument } = await import('https://cdn.jsdelivr.net/npm/pdf-lib@1.17.1/dist/pdf-lib.esm.js');
const formUrl = 'notebookTemplate.pdf';
const pdfBytes = await fetch(formUrl).then(r => r.arrayBuffer());
const pdfDoc = await PDFDocument.load(pdfBytes);
const form = pdfDoc.getForm();
form.getTextField('pNotes1').setText(localStorage.getItem('eNotes1') || '');
...
Because Storyline runs outside of RISE’s strict sandbox, it can freely:
- Fetch and modify local files,
- Generate a new PDF,
- And open a Save As dialog for the learner.
When we tried the same logic directly inside a Custom Code Block, RISE displayed a success message — but the file never actually downloaded.
That’s because the sandboxed iframe environment doesn’t allow blob downloads or file system access.
Our modified demo below uses Custom Code Blocks for data capture but the original Storyline Block for the final pdf file creation and download:
Demo - Downloadable Notes using Custom Code Blocks and Local Browser storage
The other limitation was that the 'Continue' divider blocks did not wait for completion of the preceding Custom Code Block even though that setting was selected. We found workarounds to this problem but it is definitely a feature we would like to see in future releases.
In summary:
The new Custom Code Block is a fantastic addition to Rise 360 — it finally gives developers a way to embed real interactivity and persistence without leaving the platform.
For me, it opens up a lot of flexibility for client projects:
We can now build lightweight interactive elements directly in Rise, and still use our existing Storyline-based tools (like the Notes-to-PDF generator) where more advanced browser functionality is needed.
It’s not yet a full Storyline replacement, but it’s a strong step in that direction.
Related Content
- 3 months ago
- 10 months ago
- 3 months ago