Your Community is getting an upgrade!
Read about our partnership with Higher Logic and how we will build the next generation of the Instructure Community.
Found this content helpful? Log in or sign up to leave a like!
When wrapping HTML page code in comment tags
<!--
Some lines of HTML page code here
-->
and saving, the commented-out code disappears for good.
This is bad, what can one do?
Solved! Go to Solution.
Looks like that's just code that Canvas won't allow unfortunately. Here's another post someone had on this topic.
If you're using comments to hide things on a page, a workaround could be adding a div around the things you're wanting hidden with a display: none attribute.
EX)
<div style="display: none;">
content you'd like hidden
</div>
Hello @Andreas_Hopf - I like Elijah's suggestion but also wish to share the Canvas HTML Editor Allowlist.
Looks like that's just code that Canvas won't allow unfortunately. Here's another post someone had on this topic.
If you're using comments to hide things on a page, a workaround could be adding a div around the things you're wanting hidden with a display: none attribute.
EX)
<div style="display: none;">
content you'd like hidden
</div>
Ok, thanks. Wish I had known this before.
Hello @Andreas_Hopf - I like Elijah's suggestion but also wish to share the Canvas HTML Editor Allowlist.
It is absolutely absurd to me that Canvas has stripped this functionality. Comments tags are incredibly useful, a hidden attribute doesn't change the syntax display in the same way comment tags do, making it much more difficult to navigate longer code.
To interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign InTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign In