Embed Code not working, still

chris_carlson
Community Novice

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:

  1. Took Javascript HTML code, saved it to a small html file and uploaded that file into the course FILES section.
  2. Copied the link to the file in the course, and then worked in the Page HTML editor to create the <iframe>.
  3. Pasted and edited the link, stripping the code after the fileID, and replacing it with /preview, and set some scale parameters.
  4. 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.
    1. 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?

0 Likes