Is there a list of accepted HTML elements that we can use in the HTML editor?
Hi again, Will Breitbach...
Here is a PDF I was given from Lorin Burnett from the Canvas Help Desk staff. Hope this information is of use to you!
Hi Will Breitbach...
I spent a little time chatting with Instructure's tech support about your question because I wasn't sure if there was any documentation available or not. The technician is going to be e-mailing me soon with a list. Once I get that, I'll come back and attach it for your reference.
Thanks Chris. This is great!
I appreciate the help.
Do you know if washing away the <!-- --> tag (HTML comment tag) is done on purpose? One of our instructors lost some of his work because he wanted to comment out things that was not ready yet.
I suggested he used the div tag as a workaround:
<div style="display: none;">
<p>This will not be displayed until display: none is changed to display:inline</p>
Erlend Thune (admin)...
I am not sure of the reasoning behind stripping out the HTML commenting tag. (Scott Dennis or Renee Carney, do you know?) I have never used it myself. However, I think your work-around with the div tag would be the thing to do for now. That sounds like a good code-snippet!
Neither method -- HTML comment or style="display:none;" will keep the determined or knowledgeable student from seeing it — they can just view the page's source code.
As far as the reason they strip it out, a possibility might be conditional comments that are supported by Microsoft's Internet Explorer.
<!--[if lte IE 9]><p>Here are the answers to the test: A, B, B, A, C, D.</p><p>However, because you're running a supported browser like a good student, you'll neversee these answers unless you go in and view the source code.</p><![endif]-->
<!--[if lte IE 9]>
<p>Here are the answers to the test: A, B, B, A, C, D.</p>
<p>However, because you're running a supported browser like a good student, you'll never
see these answers unless you go in and view the source code.</p>
That is kind of like allowing scripting or specialized formatting or other HTML or CSS hacks that are generally bad design. Canvas wants people to do stuff that works in all of the supported browsers, not just one of them. Stick to the standards and use a browser that supports them. When new functionality comes out, it's probably not going to be allowed within Canvas until after it has widespread support.
Furthermore, Canvas is concerned with displaying information to the user and HTML Comments are the opposite of that, so it probably didn't take long, even if the conditional comments was never part of the original discussion, to rule them out.
I've noticed that when content is copied from Word to Blackboard, the largest amount (sometimes pages' worth) of extra code is found in <!--[if]><![endif]--> chunks.
I suspect that this is why it is automatically removed in Canvas.
I will post this doc in our Canvas Hacks classroom, unless some has already done so. In fact, it is already done. Think folks will find this helpful, so thanks again!
Kelley, here's the link to the PDF in case you'd like to put this in the Canvas Hacks classroom as well: Canvas HTML Whitelist
The page in the Community offered a PDF download, so I just grabbed that. But that doesn't mean your thoughtfulness is any less appreciated.
You're welcome, Kelley. I generally use the link rather than the downloaded PDF in case Instructure updates the list.
That makes sense, and I will make that change
Could you add me to the Canvas Hacks Classroom? email@example.com
You should receive your invite soonest.
Retrieving data ...