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:
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!
Solved! Go to Solution.
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.
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).
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.