CodinGame / codingame-game-engine

CodinGame Engine
https://www.codingame.com
MIT License
113 stars 41 forks source link

<!-- SHOW_SAVE_PDF_BUTTON --> doesn't work #70

Closed Butanium closed 2 years ago

Butanium commented 2 years ago

I saw in the spring challenge 2022 statement that it was possible to add a button to save the statement as pdf.

When I tried to use this in clash of bits, nothing appears in CodinGame. image

Is this option reserved to contests ?

CGjupoulton commented 2 years ago

This is sort of a hidden feature for now, as it is largely untested. Our html sanitizer is removing the comment from your file, and that doesn't happen when I am the one uploading a game. Similarly to our recent problems with x-overflow, owasp doesn't provide a way to retain comments. As of right now, I can make no promises on when or if this feature will be available

Butanium commented 2 years ago

Ok, that's why it's not documented yet. Thanks for your answer !

CGjupoulton commented 2 years ago

@Butanium full disclosure, the IDE only checks for the presence of the string <!-- SHOW_SAVE_PDF_BUTTON --> within the statement, so if you really want that button in your game you could add something along the lines of

<div class="<!-- SHOW_SAVE_PDF_BUTTON -->"></div>

to your statement and the button should show up :)

Please note that the feature is experimental and I will not be in a position to help you if e.g. none of your images appear in the resulting pdf.

Butanium commented 2 years ago

OK @chickentuna, do you want me to report the issue that I may encounter (even if you can't solve it) in this thread or do I just ignore them ?

CGjupoulton commented 2 years ago

Probably best to ignore them for now. Known issues include: