[ARCHIVED] Embed Code not working, still
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2020
07:20 AM
Hi, I'm having trouble embedding an <iframe> in a Canvas Page to display an external formsite form for students. I have reviewed Embed Code Not Working and think I was close, but the result just displays the <script> from the html file? Snippet and steps below.
My steps:
- Took Javascript HTML code, saved it to a small html file and uploaded that file into the course FILES section.
- Copied the link to the file in the course, and then worked in the Page HTML editor to create the <iframe>.
- Pasted and edited the link, stripping the code after the fileID, and replacing it with /preview, and set some scale parameters.
- Saved. Reloaded the page (for luck). Only the actual javascript appears in the Page, not the iframe of the form? (Don’t click the link – it loads all the form code!). Tested on three browsers and a mobile device.
- Working on a MacBook Pro 2016/OS 10.14.6, latest editions of Chrome, Firefox, Safari, and an iPhone 7
Snippet
<p><iframe src="https://gordon.instructure.com/courses/346/files/117597/preview" width="100%" height="800" data-api-endpoint="https://gordon.instructure.com/api/v1/courses/346/files/117597" data-api-returntype="File"></iframe></p>
Maybe I'm missing something obvious in the code?
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.