Feature #14115

Add Twine Embed Plugin

Added by Laurie Hurson about 1 year ago. Updated about 1 year ago.

Priority name:
Category name:
Shortcodes and embeds
Target version:
Start date:
Due date:
% Done:


Estimated time:


Hi All,

Can we add the the Embed Twine Plugin to the Commons?


The OER Librarian from CSI is hoping to have students navigate through a twine story on her Commons site:



#1 Updated by Boone Gorges about 1 year ago

  • Status changed from New to Reporter Feedback

I've had a look at the plugin, and I'm afraid it's not going to be possible on the Commons. It appears that Twine produces .html documents that contain extensive JavaScript, and the plugin works by allowing you to upload the .html file and display it in an iframe. This is a vector for serious security issues, so we can't allow it on the Commons. (There are other security problems with the plugin as well.)

My only knowledge of Twine comes from the last three minutes reading their website, so maybe someone else understands better what it is. Is it only a piece of software that you run locally? Or is there a service where you can create a Twine document and then have it hosted by Twine? If the latter, then we might be able to build an embed code for that trusted source.

#2 Updated by Laurie Hurson about 1 year ago

This is good to know, thanks Boone.

She did want to upload the twine html and I thought uploading via the plugin might be ok security-wise. But I understand that the plugin doesn't resolve that issue.(this sound similar to the issues with h5p plugin and libraries)

Twine is a storytelling plugin that allows users to navigate through a series of choices or scenarios, kind of like a choose your own adventure book. I can look into twine more to see if it can be externally hosted on the twine site and circle back to see if we might be able to embed that way.

#3 Updated by Laurie Hurson about 1 year ago

Hi All,

It looks like [[]] is a typical place to host twine games. Once hosted on, you can get a iframe embed code for the game.

Would it be possible to create a custom embed code for iframes from in order to host twine games on the commons?

Sample iframe here:

<iframe src="" allowfullscreen="" width="640" height="380" frameborder="0"><a href="">Play Twine test 1 on</a></iframe>

#4 Updated by Boone Gorges about 1 year ago

Awesome, thank you for researching this, Laurie. It's hard to find a specific statement about it, but it seems like does at least some basic security scanning. See eg So I think that an embed code should be possible.

Can you share a screenshot of where you got that embed code from? I don't see anything at - I wonder whether it's available only for logged-in users? I need to decide exactly what information I ask for (such as the URL) when building the embed code.

#5 Updated by Laurie Hurson about 1 year ago

Great to hear embed code might be possible.And shout out to Anthony who knows a lot about twine and let me know that might be a good place to host.

I got the embed code from the "dashboard" of my account screenshot attached.

#6 Updated by Boone Gorges about 1 year ago

  • Category name set to Shortcodes and embeds
  • Status changed from Reporter Feedback to Staged for Production Release
  • Assignee set to Boone Gorges
  • Target version set to 1.18.6

Thanks, this is very helpful. I've added support in for the following:

- a shortcode [itchio src="" width="100%" height="800"]
- an embed handler shortcut for the shortcode, so that entering on its own line will do the same thing as [itchio src="" width="640" height="380"]

This will be available after tomorrow's release.

#7 Updated by Laurie Hurson about 1 year ago

This is great, thanks so much Boone!

#8 Updated by Boone Gorges about 1 year ago

  • Status changed from Staged for Production Release to Resolved

#9 Updated by Laurie Hurson about 1 year ago

Hi Boone,

Just a report back-- it looks like the direct link for the twine game now works for embedding in the Commons:

I cannot get the shortcode embed to work but I maybe be doing something wrong:

#10 Updated by Boone Gorges about 1 year ago

Thanks for following up! There's an error in my comment above - the correct attribute for the URL is url, not src. I've made the change.

#11 Updated by Laurie Hurson about 1 year ago

Thanks Boone! Both versions work now. I have passed directions on to the faculty member from CSI so we may have a new twine project on the Commons soon.

Thanks again.

Also available in: Atom PDF