[ARCHIVED] Embedding Remind Widget into Course Page

Jump to solution
kbeimfohr
Community Participant

I am trying to embed a Remind widget into my course page.  I go to the HTML Editor and paste the code they gave me:

<script src="https://widgets.remind.com/iframe.js?token=3d3bfc90e5d3013277eb3f9249bd17cc"></script>

When I save it, the page is empty.  If I go back to edit the code again, it is not there.  It appears that it isn't saving the code.  Can anyone help me figure out how to embed the code so the Remind feed will show up on the page, similar to a twitter widget feed?  Thanks!

Labels (1)
1 Solution
James
Community Champion

kbeimfohr​,

The <script> tag is not allowed inside of Canvas pages. A list of acceptable tags is at https://s3.amazonaws.com/tr-learncanvas/docs/Canvas_HTML_Whitelist.pdf

The decision to keep users from running <script> tags has lots of reasoning behind it. Foremost is security. Allowing external scripts to run on the page within Canvas would allow the script writer to potentially run things with the permissions of the user and definitely expose information that shouldn't be exposed.

To do this kind of thing, you'll need to use an iframe. I notice the page you call creates its own iframe, but to get Canvas to call it, you need to put an iframe into Canvas with a src of the page you want to load.

Pasting the script you provided as the source doesn't work. It just provides the source of the javascript within the window.

However, what you need to do is pretty simple. I don't use remind.com, but I was able to take your code and get it to work in my Canvas sandbox.

Go into the HTML editor on the page and then paste this code. I got the code from inside the script you had listed. Feel free to change the height and width:

<iframe src="https://r101-widgets.herokuapp.com/3d3bfc90e5d3013277eb3f9249bd17cc" width="600" height="150"></iframe>

This is what it looks like (the iframe test kyle was the page name I used in Canvas).

kyle_remind-com.png

By the way, I don't know how sensitive that token is, but you may want to change your token now that you've posted it on the Internet. Or maybe not, maybe you'll have lots of people following your reminders.

View solution in original post