cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Member

Google Search embedded in Canvas Page

I have a teacher who has created a "custom" Google search that only allows results from certain websites. When trying to implement everything suggested in the Google Guide (Implementing search box  |  Custom Search  |  Google Developers ) the only thing that is displayed in the page is the script text. 

Is this even possible? Does Canvas prevent adding HTML elements within the page? I could see how this could pose an issue on the back end side; especially when generating results for the Google search. 

7 Replies
Highlighted
Community Coach
Community Coach

trenton.tyler@duneland.k12.in.us,

Here is the information about the HTML editor in Canvas:

When attempting to do custom HTML coding in Canvas, you may discover that certain HTML codes do not work upon saving. This is because Canvas will only support certain HTML elements for security reasons. This also applies to content copied and pasted from an external source.

Here is the link to the Whitelist:

https://s3.amazonaws.com/tr-learncanvas/docs/Canvas_HTML_Whitelist.pdf 

It may not allow you to embed the Google Search option due to security concerns.

Robbie

Highlighted
Community Member

Hi trenton.tyler@duneland.k12.in.us! If this is not possible in the HTML editor because of the limitations that Robbie has pointed out, it may be possible in the Files area. I have had a lot of success by using javascript calls in a File (I use a lot of Twitter, Flickr, and Pinterest) which you can then iframe into a Page. Here's an example of how that works with Twitter javascript for example:

https://community.canvaslms.com/people/laurakgibbs/blog/2017/07/25/an-instcon-twitter-widget-in-unde... 

And I am 99% sure that I saw a custom Google Search embedded in one of awilliams‌'s Canvas courses, but I have lost the bookmark so I cannot link to it here; maybe he can chime in with the links and some suggestions!

Highlighted

We did this for the Resource Center for Faculty course at my last job. It was done through a custom HTML file uploaded to the files area of the course and then embedded using the LTI redirect tool. The catch is that the course has to be publicly visible. http://bit.ly/ccc-rcf

Highlighted

Now I have bookmarked this for future reference, awilliams‌! Super!

I think for what the instructor designed, the same LTI trick will work (it's not a search of course materials but some other kind of Google custom search apparently).

THANK YOU!

Highlighted

I was just getting back into this and it looks like I misremembered. I actually hosted the small Google custom search code in an HTML file externally rather than uploading to the course files area because of the way it looks. Much cleaner to redirect to external file.

Highlighted
Community Coach
Community Coach

Hello there, trenton.tyler@duneland.k12.in.us...

As I was reviewing older discussion topics here in the Canvas Community, I came across your question. It looks like you have received some feedback from rogrant@nmsu.edulaurakgibbs, and awilliams.  I wanted to check in with you to see if you've had an opportunity to review their responses because we've not heard from you since you first posted this question four months ago.  If so, did any of their responses help to answer your question?  Or, are you still looking for some help with your initial question?  If you feel that Robbie, Laura, or Adam has helped to answer your question, please go ahead and mark his/her question as "Correct".  However, if you are still looking for some assistance from members of the Community, please come back to this thread to post a message below so that we can help you out.  I'm going to mark your question as "Assumed Answered" because we've not heard back from you and because there hasn't been any new activity in this thread since October 10, 2017.  However, that won't prevent you or others from posting additional questions and/or comments below that are related to this topic.  I hope that's alright with you, Trenton.  Looking forward to hearing back from you soon.

Highlighted
Surveyor

Hi, Just wanted to add a comment because I was looking for this exact solution and it is always such a happy relief to find a solution right away on the community. Thanks @Adam Williams and the rest of you folks.

Top Kudoed Authors
Labels