Embedding StoryMaps JS
We have a faculty member using StoryMaps JS and wants students to embed maps into posts for display on the commons site: https://storymap.knightlab.com/
We have a timelineJS plugin to embed timelines (created with a tool from the same developers) but it looks like there is nothing similar for storymapsjs. Storymaps can be embedded with an iframe but it is striped out when the post is published or saved.
Can we create a workaround to embed storymaps on the commons? Maybe adding it to this help page about embedding? https://help.commons.gc.cuny.edu/embedding-content-from-other-sites/
#2 Updated by Laurie Hurson 3 months ago
Students are currently submitting storymaps links in comments on a blog post (as a workaround in place of embedding). This is the professors site: https://cbse3203atbc.commons.gc.cuny.edu/submit-your-story-map/
Here is a story maps link: https://uploads.knightlab.com/storymapjs/66cdba549e8279c7f6017c15f4d147ba/a-story/index.html
I asked the professor to provide the iframe link and will add to this ticket once I get it.
#6 Updated by Raymond Hoh about 1 month ago
- Status changed from Reporter Feedback to Assigned
- Assignee changed from Boone Gorges to Raymond Hoh
- Target version changed from 1.14.10 to 1.14.11
It looks like StoryMaps JS uses oEmbed, but WordPress has very tight security surrounding
<iframe> elements, which is why you are seeing nothing during previews and saves, Laurie.
I want to spend a little time to loosen these restrictions that WordPress imposes instead of introducing yet another shortcode. This will also be useful for future sites that use oEmbed with iframes, but are restrained by WordPress.
Assigning to myself.
#7 Updated by Raymond Hoh 30 days ago
- Category name set to WordPress (misc)
- Status changed from Assigned to Resolved
Laurie, after today's maintenance release, you should be able to embed StoryMaps JS links by just copying and pasting the URL on its own line in the Classic Editor.
In the Block Editor, you'll have to paste the URL in the "Embed" block:
The URL must begin with "https://uploads.knightlab.com/storymapjs/".