HTML comments delete page code when saving

Jump to solution
Andreas_Hopf
Community Explorer

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?

Labels (1)
1 Solution
ElijahDow
Community Explorer

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>

 

View solution in original post

0 Likes